cc.redberry.core.groups.permutations
Class InducedOrdering
- java.lang.Object
-
- cc.redberry.core.groups.permutations.InducedOrdering
-
- All Implemented Interfaces:
- IntComparator
public class InducedOrdering extends java.lang.Object implements IntComparator
An ordering of points Ω(n) induced by a base B: if bi, bj ∈ B then bi < bj if and only if i < j, and b < a for any b ∈ B and a ∉ B .- Since:
- 1.1.6
-
-
Field Summary
-
Fields inherited from interface cc.redberry.core.utils.IntComparator
DEFAULT
-
-
Constructor Summary
Constructors Constructor and Description InducedOrdering(int[] base)Construct an ordering induced by specified base
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompare(int a, int b)intmax(int[] array)Returns the <-greatest point under this ordering in specified array.intmax(IntArrayList array)Returns the <-greatest point under this ordering in specified array.intmax(int a, int b)Returns the <-greatest point under this ordering.intmaxElement()Returns the max element representative under this ordering, i.e.intmin(int[] array)Returns the <-least point under this ordering in specified array.intmin(IntArrayList array)Returns the <-least point under this ordering in specified array.intmin(int a, int b)Returns the <-least point under this ordering.intminElement()Returns the min element representative under this ordering, i.e.intpositionOf(int a)Returns a position of specified point in base orInteger.MAX_VALUEif specified point is not a base point.
-
-
-
Constructor Detail
-
InducedOrdering
public InducedOrdering(int[] base)
Construct an ordering induced by specified base- Parameters:
base- base permutation group
-
-
Method Detail
-
positionOf
public int positionOf(int a)
Returns a position of specified point in base orInteger.MAX_VALUEif specified point is not a base point.- Parameters:
a- some point- Returns:
- position of specified point in base or
Integer.MAX_VALUEif specified point is not a base point
-
compare
public int compare(int a, int b)- Specified by:
comparein interfaceIntComparator
-
max
public int max(int a, int b)Returns the <-greatest point under this ordering.- Parameters:
a- pointb- point- Returns:
- <-greatest point under this ordering
-
min
public int min(int a, int b)Returns the <-least point under this ordering.- Parameters:
a- pointb- point- Returns:
- <-least point under this ordering
-
maxElement
public int maxElement()
Returns the max element representative under this ordering, i.e. the element that larger then all points- Returns:
- max element representative under this ordering, i.e. the element that larger then all points
-
minElement
public int minElement()
Returns the min element representative under this ordering, i.e. the element that less then any point. Returns -1 in this implementation.- Returns:
- max element representative under this ordering, i.e. the element that larger then all points
-
min
public int min(int[] array)
Returns the <-least point under this ordering in specified array.- Parameters:
array- array- Returns:
- <-least point under this ordering
-
min
public int min(IntArrayList array)
Returns the <-least point under this ordering in specified array.- Parameters:
array- array- Returns:
- <-least point under this ordering
-
max
public int max(int[] array)
Returns the <-greatest point under this ordering in specified array.- Parameters:
array- array- Returns:
- <-greatest point under this ordering
-
max
public int max(IntArrayList array)
Returns the <-greatest point under this ordering in specified array.- Parameters:
array- array- Returns:
- <-greatest point under this ordering
-
-
DataMelt 3.0 © DataMelt by jWork.ORG