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

📄 expandedreswindow.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:   ExpandedResWindow.java

package dtw;

import matrix.ColMajorCell;
import timeseries.PAA;
import timeseries.TimeSeries;

// Referenced classes of package dtw:
//            SearchWindow, WarpPath

public class ExpandedResWindow extends SearchWindow
{

    public ExpandedResWindow(TimeSeries tsI, TimeSeries tsJ, PAA shrunkI, PAA shrunkJ, WarpPath shrunkWarpPath, int searchRadius)
    {
        super(tsI.size(), tsJ.size());
        int currentI = shrunkWarpPath.minI();
        int currentJ = shrunkWarpPath.minJ();
        int lastWarpedI = 0x7fffffff;
        int lastWarpedJ = 0x7fffffff;
        for(int w = 0; w < shrunkWarpPath.size(); w++)
        {
            ColMajorCell currentCell = shrunkWarpPath.get(w);
            int warpedI = currentCell.getCol();
            int warpedJ = currentCell.getRow();
            int blockISize = shrunkI.aggregatePtSize(warpedI);
            int blockJSize = shrunkJ.aggregatePtSize(warpedJ);
            if(warpedJ > lastWarpedJ)
                currentJ += shrunkJ.aggregatePtSize(lastWarpedJ);
            if(warpedI > lastWarpedI)
                currentI += shrunkI.aggregatePtSize(lastWarpedI);
            if(warpedJ > lastWarpedJ && warpedI > lastWarpedI)
            {
                super.markVisited(currentI - 1, currentJ);
                super.markVisited(currentI, currentJ - 1);
            }
            for(int x = 0; x < blockISize; x++)
            {
                super.markVisited(currentI + x, currentJ);
                super.markVisited(currentI + x, (currentJ + blockJSize) - 1);
            }

            lastWarpedI = warpedI;
            lastWarpedJ = warpedJ;
        }

        super.expandWindow(searchRadius);
    }
}

⌨️ 快捷键说明

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