⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windowmatrix.java

📁 用java写的DTW程序组合
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   WindowMatrix.java

package dtw;

import java.io.PrintStream;

// Referenced classes of package dtw:
//            MemoryResidentMatrix, SwapFileMatrix, CostMatrix, SearchWindow

class WindowMatrix
    implements CostMatrix
{

    private CostMatrix windowCells;

    WindowMatrix(SearchWindow searchWindow)
    {
        try
        {
            windowCells = new MemoryResidentMatrix(searchWindow);
        }
        catch(OutOfMemoryError e)
        {
            System.err.println("Ran out of memory initializing window matrix, all cells in the window cannot fit into main memory.  Will use a swap file instead (will run ~50% slower)");
            System.gc();
            windowCells = new SwapFileMatrix(searchWindow);
        }
    }

    public void put(int col, int row, double value)
    {
        windowCells.put(col, row, value);
    }

    public double get(int col, int row)
    {
        return windowCells.get(col, row);
    }

    public int size()
    {
        return windowCells.size();
    }

    public void freeMem()
    {
        if(windowCells instanceof SwapFileMatrix)
            try
            {
                ((SwapFileMatrix)windowCells).freeMem();
            }
            catch(Throwable t) { }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -