- java.lang.Object
-
- org.ojalgo.matrix.decomposition.Pivot
-
final class Pivot extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.BitSetmyDoneBitsprivate booleanmyModifiedprivate int[]myOrderprivate int[]myReverseprivate booleanmyReverseNeedsUpdateprivate intmySign
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) <N extends java.lang.Comparable<N>,M extends Access2D<N> & Mutate2D>
voidapplyPivotOrder(M arg)Equivalent to selecting the rows (or columns) in the pivot order,arg.rows(pivot.getOrder()).(package private) <N extends java.lang.Comparable<N>,M extends Access2D<N> & Mutate2D>
voidapplyReverseOrder(M arg)Equivalent to selecting the rows (or columns) in the reverse order,arg.rows(pivot.reverseOrder()).(package private) voidchange(int ind1, int ind2)(package private) voidcycle(int ind1, int ind2)Performs a cycle permutation on the pivot order.private static int[]doReverse(int[] original, int[] inverse)private <N extends java.lang.Comparable<N>,M extends Access2D<N> & Mutate2D>
voidfollowPermutationCycles(M elements, int[] order)(package private) int[]getOrder()(package private) booleanisModified()(package private) intlocationOf(int original)(package private) voidreset(int numberOf)(package private) static int[]reverse(int[] original)(package private) int[]reverseOrder()(package private) intsignum()java.lang.StringtoString()
-
-
-
Method Detail
-
doReverse
private static int[] doReverse(int[] original, int[] inverse)
-
reverse
static int[] reverse(int[] original)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
followPermutationCycles
private <N extends java.lang.Comparable<N>,M extends Access2D<N> & Mutate2D> void followPermutationCycles(M elements, int[] order)
-
applyPivotOrder
<N extends java.lang.Comparable<N>,M extends Access2D<N> & Mutate2D> void applyPivotOrder(M arg)
Equivalent to selecting the rows (or columns) in the pivot order,arg.rows(pivot.getOrder()).
-
applyReverseOrder
<N extends java.lang.Comparable<N>,M extends Access2D<N> & Mutate2D> void applyReverseOrder(M arg)
Equivalent to selecting the rows (or columns) in the reverse order,arg.rows(pivot.reverseOrder()).
-
change
void change(int ind1, int ind2)
-
cycle
void cycle(int ind1, int ind2)Performs a cycle permutation on the pivot order.This method applies a cycle permutation that moves the element at position ind1 to position ind2, while shifting all elements in between one position to the left.
The method only performs the cycle if ind1 is less than ind2. If ind1 is greater than or equal to ind2, no changes are made to the pivot order.
- Parameters:
ind1- The starting index of the cycleind2- The ending index of the cycle
-
getOrder
int[] getOrder()
-
isModified
boolean isModified()
-
locationOf
int locationOf(int original)
-
reset
void reset(int numberOf)
-
reverseOrder
int[] reverseOrder()
-
signum
int signum()
-
-