Class ContouringColorPair
- java.lang.Object
-
- net.sourceforge.jiu.color.quantization.ContouringColorPair
-
- All Implemented Interfaces:
ComparatorInterface
class ContouringColorPair extends Object implements ComparatorInterface
A data structure for storing the index values of a pair of contouring colors plus their respective self co-occurrence frequency values.- Author:
- Marco Schmidt
- See Also:
MedianCutContourRemoval
-
-
Constructor Summary
Constructors Constructor Description ContouringColorPair()Creates a new object of this class.ContouringColorPair(int i1, int i2, double sf1, double sf2)Creates a new object of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Object o1, Object o2)Compares the two argument objects and returns their relation.intgetColorIndex(boolean smaller)
-
-
-
Constructor Detail
-
ContouringColorPair
public ContouringColorPair()
Creates a new object of this class.
-
ContouringColorPair
public ContouringColorPair(int i1, int i2, double sf1, double sf2)Creates a new object of this class.- Parameters:
i1- palette index of first colori2- palette index of second colorsf1- self co-occurrence frequency value of first colorsf2- self co-occurrence frequency value of second color
-
-
Method Detail
-
compare
public int compare(Object o1, Object o2)
Description copied from interface:ComparatorInterfaceCompares the two argument objects and returns their relation. Returns- a value < 0 if
o1is smaller thano2, - 0 if
o1is equal too2and - a value > 0 if
o1is greater thano2.
- Specified by:
comparein interfaceComparatorInterface
- a value < 0 if
-
getColorIndex
public int getColorIndex(boolean smaller)
-
-