Package com.tagtraum.audiokern.segments
Class SimpleDiagonalPaths.SampledSimilarity
- java.lang.Object
-
- com.tagtraum.audiokern.segments.SimpleDiagonalPaths.SampledSimilarity
-
- All Implemented Interfaces:
Comparable<SimpleDiagonalPaths.SampledSimilarity>
- Enclosing class:
- SimpleDiagonalPaths
public static class SimpleDiagonalPaths.SampledSimilarity extends Object implements Comparable<SimpleDiagonalPaths.SampledSimilarity>
-
-
Constructor Summary
Constructors Constructor Description SampledSimilarity(int row, int column, int length)
-
Method Summary
-
-
-
Method Detail
-
getTransitive
public SimpleDiagonalPaths.SampledSimilarity getTransitive(SimpleDiagonalPaths.SampledSimilarity that)
If twoSimpleDiagonalPaths.SampledSimilarity
s cover the same area with their row or column, but different areas with the other paths, the other paths also have to be similar. This method returns aSimpleDiagonalPaths.SampledSimilarity
that represents the relationship between the two other areas that is otherwise not explicitly expressed.- Parameters:
that
- other similarity- Returns:
- transitive similarity or null, if there is none
-
swap
public SimpleDiagonalPaths.SampledSimilarity swap()
Swaps row and column.- Returns:
- swapped version
-
getColumn
public int getColumn()
-
getLength
public int getLength()
-
getRow
public int getRow()
-
getRow
public int getRow(int column)
-
getColumn
public int getColumn(int row)
-
isRepeat
public boolean isRepeat()
-
rowOverlaps
public float rowOverlaps(SimpleDiagonalPaths.SampledSimilarity that)
-
columnOverlaps
public float columnOverlaps(SimpleDiagonalPaths.SampledSimilarity that)
-
contains
public boolean contains(SimpleDiagonalPaths.SampledSimilarity that)
-
compareTo
public int compareTo(SimpleDiagonalPaths.SampledSimilarity that)
- Specified by:
compareTo
in interfaceComparable<SimpleDiagonalPaths.SampledSimilarity>
-
containsRow
public boolean containsRow(int row, int tolerance)
-
containsColumn
public boolean containsColumn(int column, int tolerance)
-
contains
public boolean contains(int row, int column)
-
contains
public boolean contains(int row, int column, int tolerance)
-
contains
public boolean contains(int point)
-
overlaps
public boolean overlaps(SimpleDiagonalPaths.SampledSimilarity that)
-
merge
public SimpleDiagonalPaths.SampledSimilarity merge(SimpleDiagonalPaths.SampledSimilarity that)
-
split
public SimpleDiagonalPaths.SampledSimilarity[] split(SimpleDiagonalPaths.SampledSimilarity template)
Splits this similarity into 1 to 3 parts, depending on the given template.- Parameters:
template
- template- Returns:
- this - if we are not partially overlapped by template, 2 parts - if the this is overlapped at one end, and 3 parts - if the template is in the center of this
-
translate
public int translate(int point)
-
-