net.sourceforge.swimp.coin
Class CoinPackedMatrix

java.lang.Object
  extended by net.sourceforge.swimp.coin.CoinPackedMatrix

public class CoinPackedMatrix
extends java.lang.Object


Field Summary
protected  boolean swigCMemOwn
           
 
Constructor Summary
CoinPackedMatrix()
           
CoinPackedMatrix(boolean colordered, double extraMajor, double extraGap)
           
CoinPackedMatrix(boolean colordered, int minor, int major, int numels, SWIGTYPE_p_double elem, SWIGTYPE_p_int ind, SWIGTYPE_p_int start, SWIGTYPE_p_int len)
           
CoinPackedMatrix(boolean colordered, int minor, int major, int numels, SWIGTYPE_p_double elem, SWIGTYPE_p_int ind, SWIGTYPE_p_int start, SWIGTYPE_p_int len, double extraMajor, double extraGap)
           
CoinPackedMatrix(boolean colordered, SWIGTYPE_p_int rowIndices, SWIGTYPE_p_int colIndices, SWIGTYPE_p_double elements, int numels)
           
CoinPackedMatrix(CoinPackedMatrix m)
           
CoinPackedMatrix(CoinPackedMatrix wholeModel, int numberRows, SWIGTYPE_p_int whichRows, int numberColumns, SWIGTYPE_p_int whichColumns)
           
CoinPackedMatrix(long cPtr, boolean cMemoryOwn)
           
 
Method Summary
 void appendCol(CoinPackedVectorBase vec)
           
 void appendCol(int[] intArr, double[] doubleArr)
           
 void appendCol(int vecsize, SWIGTYPE_p_int vecind, SWIGTYPE_p_double vecelem)
           
 void appendCols(CoinPackedVectorBase[] cols)
           
 int appendCols(int numcols, SWIGTYPE_p_int columnStarts, SWIGTYPE_p_int row, SWIGTYPE_p_double element)
           
 int appendCols(int numcols, SWIGTYPE_p_int columnStarts, SWIGTYPE_p_int row, SWIGTYPE_p_double element, int numberRows)
           
 void appendRow(CoinPackedVectorBase vec)
           
 void appendRow(int[] intArr, double[] doubleArr)
           
 void appendRow(int vecsize, SWIGTYPE_p_int vecind, SWIGTYPE_p_double vecelem)
           
 void appendRows(CoinPackedVectorBase[] rows)
           
 int appendRows(int numrows, SWIGTYPE_p_int rowStarts, SWIGTYPE_p_int column, SWIGTYPE_p_double element)
           
 int appendRows(int numrows, SWIGTYPE_p_int rowStarts, SWIGTYPE_p_int column, SWIGTYPE_p_double element, int numberColumns)
           
 CoinPackedMatrix assign(CoinPackedMatrix rhs)
           
 void assignMatrix(boolean colordered, int minor, int major, int numels, SWIGTYPE_p_double elem, SWIGTYPE_p_int ind, SWIGTYPE_p_int start, SWIGTYPE_p_int len)
           
 void assignMatrix(boolean colordered, int minor, int major, int numels, SWIGTYPE_p_double elem, SWIGTYPE_p_int ind, SWIGTYPE_p_int start, SWIGTYPE_p_int len, int maxmajor)
           
 void assignMatrix(boolean colordered, int minor, int major, int numels, SWIGTYPE_p_double elem, SWIGTYPE_p_int ind, SWIGTYPE_p_int start, SWIGTYPE_p_int len, int maxmajor, int maxsize)
           
 void bottomAppendPackedMatrix(CoinPackedMatrix matrix)
           
 void clear()
           
 int compress(double threshold)
           
 void copyOf(boolean colordered, int minor, int major, double[] doubleArr, int[] intArr, SWIGTYPE_p_int start, SWIGTYPE_p_int len)
           
 void copyOf(boolean colordered, int minor, int major, double[] doubleArr, int[] intArr, SWIGTYPE_p_int start, SWIGTYPE_p_int len, double extraMajor)
           
 void copyOf(boolean colordered, int minor, int major, double[] doubleArr, int[] intArr, SWIGTYPE_p_int start, SWIGTYPE_p_int len, double extraMajor, double extraGap)
           
 void copyOf(boolean colordered, int minor, int major, int numels, SWIGTYPE_p_double elem, SWIGTYPE_p_int ind, SWIGTYPE_p_int start, SWIGTYPE_p_int len)
           
 void copyOf(boolean colordered, int minor, int major, int numels, SWIGTYPE_p_double elem, SWIGTYPE_p_int ind, SWIGTYPE_p_int start, SWIGTYPE_p_int len, double extraMajor)
           
 void copyOf(boolean colordered, int minor, int major, int numels, SWIGTYPE_p_double elem, SWIGTYPE_p_int ind, SWIGTYPE_p_int start, SWIGTYPE_p_int len, double extraMajor, double extraGap)
           
 void copyOf(CoinPackedMatrix rhs)
           
 void copyOfVec(boolean colordered, int minor, int major, double[] elem, int[] ind, int[] start, int[] len, double extraMajor, double extraGap)
           
 SWIGTYPE_p_int countOrthoLength()
           
static CoinPackedMatrix create(boolean colordered, int[] rowIndices, int[] colIndices, double[] elements)
           
static CoinPackedMatrix create(boolean colordered, int minor, int major, double[] elems, int[] inds, int[] starts, int[] lens)
           
static CoinPackedMatrix createSubMatrix(CoinPackedMatrix wholeModel, int[] whichRows, int[] whichColumns)
           
 void delete()
           
 void deleteCols(int[] intArr)
           
 void deleteCols(int numDel, SWIGTYPE_p_int indDel)
           
 void deleteRows(int[] intArr)
           
 void deleteRows(int numDel, SWIGTYPE_p_int indDel)
           
 void dumpMatrix()
           
 void dumpMatrix(java.lang.String fname)
           
 int eliminateDuplicates(double threshold)
           
protected  void finalize()
           
 double getCoefficient(int row, int column)
           
static long getCPtr(CoinPackedMatrix obj)
           
 SWIGTYPE_p_double getElements()
           
 double[] getElementsVec()
           
 double getExtraGap()
           
 double getExtraMajor()
           
 SWIGTYPE_p_int getIndices()
           
 int[] getIndicesVec()
           
 int getMajorDim()
           
 SWIGTYPE_p_int getMajorIndices()
           
 int[] getMajorIndicesVec()
           
 int getMaxMajorDim()
           
 int getMinorDim()
           
 SWIGTYPE_p_double getMutableElements()
           
 SWIGTYPE_p_int getMutableIndices()
           
 SWIGTYPE_p_int getMutableVectorLengths()
           
 SWIGTYPE_p_int getMutableVectorStarts()
           
 int getNumCols()
           
 int getNumElements()
           
 int getNumRows()
           
 int getSizeVectorLengths()
           
 int getSizeVectorStarts()
           
 CoinShallowPackedVector getVector(int i)
           
 int getVectorFirst(int i)
           
 int getVectorLast(int i)
           
 SWIGTYPE_p_int getVectorLengths()
           
 int[] getVectorLengthsVec()
           
 int getVectorSize(int i)
           
 SWIGTYPE_p_int getVectorStarts()
           
 int[] getVectorStartsVec()
           
 boolean isColOrdered()
           
 boolean isEquivalent(CoinPackedMatrix rhs)
           
 boolean isEquivalent2(CoinPackedMatrix rhs)
           
 void modifyCoefficient(int row, int column, double newElement)
           
 void modifyCoefficient(int row, int column, double newElement, boolean keepZero)
           
 void nullElementArray()
           
 void nullIndexArray()
           
 void nullLengthArray()
           
 void nullStartArray()
           
 void orderMatrix()
           
 void removeGaps()
           
 void replaceVector(int index, double[] doubleArr)
           
 void replaceVector(int index, int numReplace, SWIGTYPE_p_double newElements)
           
 void reserve(int newMaxMajorDim, int newMaxSize)
           
 void reserve(int newMaxMajorDim, int newMaxSize, boolean create)
           
 void reverseOrderedCopyOf(CoinPackedMatrix rhs)
           
 void reverseOrdering()
           
 void rightAppendPackedMatrix(CoinPackedMatrix matrix)
           
 void setDimensions(int numrows, int numcols)
           
 void setExtraGap(double newGap)
           
 void setExtraMajor(double newMajor)
           
 void submatrixOf(CoinPackedMatrix matrix, int numMajor, SWIGTYPE_p_int indMajor)
           
 void submatrixOfVec(CoinPackedMatrix matrix, int[] indMajor)
           
 void swap(CoinPackedMatrix matrix)
           
 DoubleArray times(CoinPackedVectorBase x)
           
 void times(CoinPackedVectorBase x, SWIGTYPE_p_double y)
           
 DoubleArray times(double[] x)
           
 void times(double[] doubleArr, SWIGTYPE_p_double y)
           
 void timesPtr(SWIGTYPE_p_double x, SWIGTYPE_p_double y)
           
 double[] timesVec(CoinPackedVectorBase x)
           
 double[] timesVec(double[] x)
           
 java.lang.String toString()
           
 void transpose()
           
 DoubleArray transposeTimes(CoinPackedVectorBase x)
           
 void transposeTimes(CoinPackedVectorBase x, SWIGTYPE_p_double y)
           
 DoubleArray transposeTimes(double[] x)
           
 void transposeTimes(double[] doubleArr, SWIGTYPE_p_double y)
           
 void transposeTimesPtr(SWIGTYPE_p_double x, SWIGTYPE_p_double y)
           
 double[] transposeTimesVec(CoinPackedVectorBase x)
           
 double[] transposeTimesVec(double[] x)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

swigCMemOwn

protected boolean swigCMemOwn
Constructor Detail

CoinPackedMatrix

public CoinPackedMatrix(long cPtr,
                        boolean cMemoryOwn)

CoinPackedMatrix

public CoinPackedMatrix()

CoinPackedMatrix

public CoinPackedMatrix(boolean colordered,
                        double extraMajor,
                        double extraGap)

CoinPackedMatrix

public CoinPackedMatrix(boolean colordered,
                        int minor,
                        int major,
                        int numels,
                        SWIGTYPE_p_double elem,
                        SWIGTYPE_p_int ind,
                        SWIGTYPE_p_int start,
                        SWIGTYPE_p_int len,
                        double extraMajor,
                        double extraGap)

CoinPackedMatrix

public CoinPackedMatrix(boolean colordered,
                        int minor,
                        int major,
                        int numels,
                        SWIGTYPE_p_double elem,
                        SWIGTYPE_p_int ind,
                        SWIGTYPE_p_int start,
                        SWIGTYPE_p_int len)

CoinPackedMatrix

public CoinPackedMatrix(boolean colordered,
                        SWIGTYPE_p_int rowIndices,
                        SWIGTYPE_p_int colIndices,
                        SWIGTYPE_p_double elements,
                        int numels)

CoinPackedMatrix

public CoinPackedMatrix(CoinPackedMatrix m)

CoinPackedMatrix

public CoinPackedMatrix(CoinPackedMatrix wholeModel,
                        int numberRows,
                        SWIGTYPE_p_int whichRows,
                        int numberColumns,
                        SWIGTYPE_p_int whichColumns)
Method Detail

getCPtr

public static long getCPtr(CoinPackedMatrix obj)

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

delete

public void delete()

getElementsVec

public double[] getElementsVec()

getIndicesVec

public int[] getIndicesVec()

getVectorStartsVec

public int[] getVectorStartsVec()

getVectorLengthsVec

public int[] getVectorLengthsVec()

getMajorIndicesVec

public int[] getMajorIndicesVec()

appendCols

public void appendCols(CoinPackedVectorBase[] cols)

appendRows

public void appendRows(CoinPackedVectorBase[] rows)

submatrixOfVec

public void submatrixOfVec(CoinPackedMatrix matrix,
                           int[] indMajor)

copyOfVec

public void copyOfVec(boolean colordered,
                      int minor,
                      int major,
                      double[] elem,
                      int[] ind,
                      int[] start,
                      int[] len,
                      double extraMajor,
                      double extraGap)

times

public DoubleArray times(double[] x)

timesVec

public double[] timesVec(double[] x)

times

public DoubleArray times(CoinPackedVectorBase x)

timesVec

public double[] timesVec(CoinPackedVectorBase x)

transposeTimes

public DoubleArray transposeTimes(double[] x)

transposeTimesVec

public double[] transposeTimesVec(double[] x)

transposeTimes

public DoubleArray transposeTimes(CoinPackedVectorBase x)

transposeTimesVec

public double[] transposeTimesVec(CoinPackedVectorBase x)

create

public static CoinPackedMatrix create(boolean colordered,
                                      int minor,
                                      int major,
                                      double[] elems,
                                      int[] inds,
                                      int[] starts,
                                      int[] lens)

create

public static CoinPackedMatrix create(boolean colordered,
                                      int[] rowIndices,
                                      int[] colIndices,
                                      double[] elements)

createSubMatrix

public static CoinPackedMatrix createSubMatrix(CoinPackedMatrix wholeModel,
                                               int[] whichRows,
                                               int[] whichColumns)

getExtraGap

public double getExtraGap()

getExtraMajor

public double getExtraMajor()

reserve

public void reserve(int newMaxMajorDim,
                    int newMaxSize,
                    boolean create)

reserve

public void reserve(int newMaxMajorDim,
                    int newMaxSize)

clear

public void clear()

isColOrdered

public boolean isColOrdered()

getNumElements

public int getNumElements()

getNumCols

public int getNumCols()

getNumRows

public int getNumRows()

getElements

public SWIGTYPE_p_double getElements()

getIndices

public SWIGTYPE_p_int getIndices()

getSizeVectorStarts

public int getSizeVectorStarts()

getSizeVectorLengths

public int getSizeVectorLengths()

getVectorStarts

public SWIGTYPE_p_int getVectorStarts()

getVectorLengths

public SWIGTYPE_p_int getVectorLengths()

getVectorFirst

public int getVectorFirst(int i)

getVectorLast

public int getVectorLast(int i)

getVectorSize

public int getVectorSize(int i)

getVector

public CoinShallowPackedVector getVector(int i)

getMajorIndices

public SWIGTYPE_p_int getMajorIndices()

setDimensions

public void setDimensions(int numrows,
                          int numcols)

setExtraGap

public void setExtraGap(double newGap)

setExtraMajor

public void setExtraMajor(double newMajor)

appendCol

public void appendCol(CoinPackedVectorBase vec)

appendCol

public void appendCol(int vecsize,
                      SWIGTYPE_p_int vecind,
                      SWIGTYPE_p_double vecelem)

appendCol

public void appendCol(int[] intArr,
                      double[] doubleArr)

appendCols

public int appendCols(int numcols,
                      SWIGTYPE_p_int columnStarts,
                      SWIGTYPE_p_int row,
                      SWIGTYPE_p_double element,
                      int numberRows)

appendCols

public int appendCols(int numcols,
                      SWIGTYPE_p_int columnStarts,
                      SWIGTYPE_p_int row,
                      SWIGTYPE_p_double element)

appendRow

public void appendRow(CoinPackedVectorBase vec)

appendRow

public void appendRow(int vecsize,
                      SWIGTYPE_p_int vecind,
                      SWIGTYPE_p_double vecelem)

appendRow

public void appendRow(int[] intArr,
                      double[] doubleArr)

appendRows

public int appendRows(int numrows,
                      SWIGTYPE_p_int rowStarts,
                      SWIGTYPE_p_int column,
                      SWIGTYPE_p_double element,
                      int numberColumns)

appendRows

public int appendRows(int numrows,
                      SWIGTYPE_p_int rowStarts,
                      SWIGTYPE_p_int column,
                      SWIGTYPE_p_double element)

rightAppendPackedMatrix

public void rightAppendPackedMatrix(CoinPackedMatrix matrix)

bottomAppendPackedMatrix

public void bottomAppendPackedMatrix(CoinPackedMatrix matrix)

deleteCols

public void deleteCols(int numDel,
                       SWIGTYPE_p_int indDel)

deleteCols

public void deleteCols(int[] intArr)

deleteRows

public void deleteRows(int numDel,
                       SWIGTYPE_p_int indDel)

deleteRows

public void deleteRows(int[] intArr)

replaceVector

public void replaceVector(int index,
                          int numReplace,
                          SWIGTYPE_p_double newElements)

replaceVector

public void replaceVector(int index,
                          double[] doubleArr)

modifyCoefficient

public void modifyCoefficient(int row,
                              int column,
                              double newElement,
                              boolean keepZero)

modifyCoefficient

public void modifyCoefficient(int row,
                              int column,
                              double newElement)

getCoefficient

public double getCoefficient(int row,
                             int column)

compress

public int compress(double threshold)

eliminateDuplicates

public int eliminateDuplicates(double threshold)

orderMatrix

public void orderMatrix()

removeGaps

public void removeGaps()

submatrixOf

public void submatrixOf(CoinPackedMatrix matrix,
                        int numMajor,
                        SWIGTYPE_p_int indMajor)

copyOf

public void copyOf(CoinPackedMatrix rhs)

copyOf

public void copyOf(boolean colordered,
                   int minor,
                   int major,
                   int numels,
                   SWIGTYPE_p_double elem,
                   SWIGTYPE_p_int ind,
                   SWIGTYPE_p_int start,
                   SWIGTYPE_p_int len,
                   double extraMajor,
                   double extraGap)

copyOf

public void copyOf(boolean colordered,
                   int minor,
                   int major,
                   int numels,
                   SWIGTYPE_p_double elem,
                   SWIGTYPE_p_int ind,
                   SWIGTYPE_p_int start,
                   SWIGTYPE_p_int len,
                   double extraMajor)

copyOf

public void copyOf(boolean colordered,
                   int minor,
                   int major,
                   int numels,
                   SWIGTYPE_p_double elem,
                   SWIGTYPE_p_int ind,
                   SWIGTYPE_p_int start,
                   SWIGTYPE_p_int len)

copyOf

public void copyOf(boolean colordered,
                   int minor,
                   int major,
                   double[] doubleArr,
                   int[] intArr,
                   SWIGTYPE_p_int start,
                   SWIGTYPE_p_int len,
                   double extraMajor,
                   double extraGap)

copyOf

public void copyOf(boolean colordered,
                   int minor,
                   int major,
                   double[] doubleArr,
                   int[] intArr,
                   SWIGTYPE_p_int start,
                   SWIGTYPE_p_int len,
                   double extraMajor)

copyOf

public void copyOf(boolean colordered,
                   int minor,
                   int major,
                   double[] doubleArr,
                   int[] intArr,
                   SWIGTYPE_p_int start,
                   SWIGTYPE_p_int len)

reverseOrderedCopyOf

public void reverseOrderedCopyOf(CoinPackedMatrix rhs)

assignMatrix

public void assignMatrix(boolean colordered,
                         int minor,
                         int major,
                         int numels,
                         SWIGTYPE_p_double elem,
                         SWIGTYPE_p_int ind,
                         SWIGTYPE_p_int start,
                         SWIGTYPE_p_int len,
                         int maxmajor,
                         int maxsize)

assignMatrix

public void assignMatrix(boolean colordered,
                         int minor,
                         int major,
                         int numels,
                         SWIGTYPE_p_double elem,
                         SWIGTYPE_p_int ind,
                         SWIGTYPE_p_int start,
                         SWIGTYPE_p_int len,
                         int maxmajor)

assignMatrix

public void assignMatrix(boolean colordered,
                         int minor,
                         int major,
                         int numels,
                         SWIGTYPE_p_double elem,
                         SWIGTYPE_p_int ind,
                         SWIGTYPE_p_int start,
                         SWIGTYPE_p_int len)

assign

public CoinPackedMatrix assign(CoinPackedMatrix rhs)

reverseOrdering

public void reverseOrdering()

transpose

public void transpose()

swap

public void swap(CoinPackedMatrix matrix)

times

public void times(double[] doubleArr,
                  SWIGTYPE_p_double y)

timesPtr

public void timesPtr(SWIGTYPE_p_double x,
                     SWIGTYPE_p_double y)

times

public void times(CoinPackedVectorBase x,
                  SWIGTYPE_p_double y)

transposeTimes

public void transposeTimes(double[] doubleArr,
                           SWIGTYPE_p_double y)

transposeTimesPtr

public void transposeTimesPtr(SWIGTYPE_p_double x,
                              SWIGTYPE_p_double y)

transposeTimes

public void transposeTimes(CoinPackedVectorBase x,
                           SWIGTYPE_p_double y)

countOrthoLength

public SWIGTYPE_p_int countOrthoLength()

getMajorDim

public int getMajorDim()

getMinorDim

public int getMinorDim()

getMaxMajorDim

public int getMaxMajorDim()

dumpMatrix

public void dumpMatrix(java.lang.String fname)

dumpMatrix

public void dumpMatrix()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isEquivalent

public boolean isEquivalent(CoinPackedMatrix rhs)

isEquivalent2

public boolean isEquivalent2(CoinPackedMatrix rhs)

getMutableElements

public SWIGTYPE_p_double getMutableElements()

getMutableIndices

public SWIGTYPE_p_int getMutableIndices()

getMutableVectorStarts

public SWIGTYPE_p_int getMutableVectorStarts()

getMutableVectorLengths

public SWIGTYPE_p_int getMutableVectorLengths()

nullElementArray

public void nullElementArray()

nullStartArray

public void nullStartArray()

nullLengthArray

public void nullLengthArray()

nullIndexArray

public void nullIndexArray()