Module ojalgo

Class Pivot


  • final class Pivot
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Pivot()  
      Pivot​(int... order)  
    • 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>
      void
      applyPivotOrder​(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>
      void
      applyReverseOrder​(M arg)
      Equivalent to selecting the rows (or columns) in the reverse order, arg.rows(pivot.reverseOrder()).
      (package private) void change​(int ind1, int ind2)  
      (package private) void cycle​(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>
      void
      followPermutationCycles​(M elements, int[] order)  
      (package private) int[] getOrder()  
      (package private) boolean isModified()  
      (package private) int locationOf​(int original)  
      (package private) void reset​(int numberOf)  
      (package private) static int[] reverse​(int[] original)  
      (package private) int[] reverseOrder()  
      (package private) int signum()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • myDoneBits

        private final java.util.BitSet myDoneBits
      • myModified

        private boolean myModified
      • myOrder

        private int[] myOrder
      • myReverse

        private int[] myReverse
      • myReverseNeedsUpdate

        private boolean myReverseNeedsUpdate
      • mySign

        private int mySign
    • Constructor Detail

      • Pivot

        Pivot()
      • Pivot

        Pivot​(int... order)
    • Method Detail

      • doReverse

        private static int[] doReverse​(int[] original,
                                       int[] inverse)
      • reverse

        static int[] reverse​(int[] original)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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 cycle
        ind2 - 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()