|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.javasoft.smx.impl.DefaultIntRationalMatrix
public class DefaultIntRationalMatrix
The DefaultIntRationalMatrix is the default implementation of
IntRationalMatrix. It contains 2 int-arrays which contain the enumerator and
denominator values for the matrix fractional integers.
| Constructor Summary | |
|---|---|
DefaultIntRationalMatrix(int[] numerators,
int[] denominators,
int rowCount,
int columnCount)
|
|
DefaultIntRationalMatrix(int rowCount,
int columnCount)
|
|
DefaultIntRationalMatrix(ReadableIntRationalMatrix mx)
|
|
| Method Summary | |
|---|---|
void |
add(int row,
int col,
int value)
|
void |
add(int row,
int col,
int numerator,
int denominator)
|
void |
addRowToOtherRow(int srcRow,
int srcFactor,
int dstRow,
int dstFactor)
|
void |
addRowToOtherRow(int srcRow,
int srcNumerator,
int srcDenominator,
int dstRow,
int dstNumerator,
int dstDenominator)
|
DefaultIntRationalMatrix |
clone()
|
static DefaultIntRationalMatrix |
diag(int[] numerators,
int[] denominators)
|
static DefaultIntRationalMatrix |
diag(int numerator,
int denominator,
int len)
|
boolean |
equals(Object obj)
|
BigFraction |
getBigFractionValueAt(int row,
int col)
|
BigInteger |
getBigIntegerDenominatorAt(int row,
int col)
|
BigInteger |
getBigIntegerNumeratorAt(int row,
int col)
|
int |
getColumnCount()
|
double[] |
getDoubleColumn(int col)
|
double[][] |
getDoubleColumns()
|
double[] |
getDoubleRow(int row)
|
double[][] |
getDoubleRows()
|
double |
getDoubleValueAt(int row,
int col)
|
int |
getIntDenominatorAt(int row,
int col)
|
int |
getIntNumeratorAt(int row,
int col)
|
long |
getLongDenominatorAt(int row,
int col)
|
long |
getLongNumeratorAt(int row,
int col)
|
MatrixOperations |
getMatrixOperations()
|
NumberOperations |
getNumberOperations()
|
Number[][] |
getNumberRows()
|
Number |
getNumberValueAt(int row,
int col)
|
int |
getRowCount()
|
int |
getSignumAt(int row,
int col)
|
int |
hashCode()
|
static DefaultIntRationalMatrix |
identity(int len)
|
void |
multiply(int row,
int col,
int factor)
|
void |
multiply(int row,
int col,
int numerator,
int denominator)
|
void |
multiplyRow(int row,
int factor)
|
void |
multiplyRow(int row,
int numerator,
int denominator)
|
void |
negate(int row,
int col)
|
DefaultIntRationalMatrix |
newInstance(int rows,
int cols)
|
DefaultIntRationalMatrix |
newInstance(Number[][] data,
boolean rowsInDim1)
|
boolean |
reduce()
Reduce the whole matrix, that is, divide numerators/denominators by their greatest common divisor |
boolean |
reduceRow(int row)
Reduce the specified row, that is, divide numerators/denominators by their greatest common divisor |
boolean |
reduceValueAt(int row,
int col)
Reduce the specified value, that is, divide numerator/denominator by their greatest common divisor |
void |
setValueAt(int row,
int col,
int value)
|
void |
setValueAt(int row,
int col,
int numerator,
int denominator)
|
void |
setValueAt(int row,
int col,
Number value)
|
BigIntegerRationalMatrix |
subBigIntegerRationalMatrix(int rowStart,
int rowEnd,
int colStart,
int colEnd)
|
DoubleMatrix |
subDoubleMatrix(int rowStart,
int rowEnd,
int colStart,
int colEnd)
|
IntRationalMatrix |
subIntRationalMatrix(int rowStart,
int rowEnd,
int colStart,
int colEnd)
|
LongRationalMatrix |
subLongRationalMatrix(int rowStart,
int rowEnd,
int colStart,
int colEnd)
|
void |
swapColumns(int colA,
int colB)
|
void |
swapRows(int rowA,
int rowB)
|
void |
toArray(double[] array)
|
BigIntegerRationalMatrix |
toBigIntegerRationalMatrix(boolean enforceNewInstance)
|
double[] |
toDoubleArray()
|
DoubleMatrix |
toDoubleMatrix(boolean enforceNewInstance)
|
IntRationalMatrix |
toIntRationalMatrix(boolean enforceNewInstance)
|
LongRationalMatrix |
toLongRationalMatrix(boolean enforceNewInstance)
|
String |
toMultilineString()
|
static String |
toMultilineString(ReadableIntRationalMatrix mx)
|
IntRationalMatrix |
toReadableMatrix(boolean enforceNewInstance)
|
String |
toString()
|
static String |
toString(ReadableIntRationalMatrix mx)
|
protected static String |
toString(ReadableIntRationalMatrix mx,
String prefix,
String postfix,
String rowPrefix,
String rowPostfix,
String rowSeparator,
String colPrefix,
String colPostfix,
String colSeparator)
|
IntRationalMatrix |
toWritableMatrix(boolean enforceNewInstance)
|
DefaultIntRationalMatrix |
transpose()
|
void |
writeTo(OutputStream out)
|
static void |
writeTo(OutputStream out,
ReadableIntRationalMatrix mx)
|
protected static void |
writeTo(PrintWriter writer,
ReadableIntRationalMatrix mx,
String prefix,
String postfix,
String rowPrefix,
String rowPostfix,
String rowSeparator,
String colPrefix,
String colPostfix,
String colSeparator)
|
void |
writeTo(Writer writer)
|
static void |
writeTo(Writer writer,
ReadableIntRationalMatrix mx)
|
void |
writeToMultiline(OutputStream out)
|
static void |
writeToMultiline(OutputStream out,
ReadableIntRationalMatrix mx)
|
void |
writeToMultiline(Writer writer)
|
static void |
writeToMultiline(Writer writer,
ReadableIntRationalMatrix mx)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultIntRationalMatrix(int rowCount,
int columnCount)
public DefaultIntRationalMatrix(int[] numerators,
int[] denominators,
int rowCount,
int columnCount)
public DefaultIntRationalMatrix(ReadableIntRationalMatrix mx)
| Method Detail |
|---|
public static DefaultIntRationalMatrix diag(int[] numerators,
int[] denominators)
public static DefaultIntRationalMatrix diag(int numerator,
int denominator,
int len)
public static DefaultIntRationalMatrix identity(int len)
public NumberOperations getNumberOperations()
getNumberOperations in interface MatrixBasepublic MatrixOperations getMatrixOperations()
getMatrixOperations in interface MatrixBase
public int getIntNumeratorAt(int row,
int col)
getIntNumeratorAt in interface ReadableIntRationalMatrix
public int getIntDenominatorAt(int row,
int col)
getIntDenominatorAt in interface ReadableIntRationalMatrix
public int getSignumAt(int row,
int col)
getSignumAt in interface ReadableMatrix
public long getLongNumeratorAt(int row,
int col)
getLongNumeratorAt in interface ReadableLongRationalMatrix
public long getLongDenominatorAt(int row,
int col)
getLongDenominatorAt in interface ReadableLongRationalMatrix
public BigInteger getBigIntegerNumeratorAt(int row,
int col)
getBigIntegerNumeratorAt in interface ReadableBigIntegerRationalMatrix
public BigInteger getBigIntegerDenominatorAt(int row,
int col)
getBigIntegerDenominatorAt in interface ReadableBigIntegerRationalMatrix
public double getDoubleValueAt(int row,
int col)
getDoubleValueAt in interface ReadableDoubleMatrix
public BigFraction getBigFractionValueAt(int row,
int col)
getBigFractionValueAt in interface ReadableBigIntegerRationalMatrixpublic int getRowCount()
getRowCount in interface MatrixBasepublic int getColumnCount()
getColumnCount in interface MatrixBase
public void setValueAt(int row,
int col,
int numerator,
int denominator)
setValueAt in interface WritableIntRationalMatrix
public void setValueAt(int row,
int col,
int value)
setValueAt in interface WritableIntMatrix
public void swapRows(int rowA,
int rowB)
swapRows in interface WritableMatrix
public void swapColumns(int colA,
int colB)
swapColumns in interface WritableMatrix
public Number getNumberValueAt(int row,
int col)
getNumberValueAt in interface ReadableMatrix
public void setValueAt(int row,
int col,
Number value)
setValueAt in interface WritableMatrixpublic String toString()
toString in interface MatrixBasetoString in class Objectpublic void writeTo(Writer writer)
writeTo in interface MatrixBasepublic void writeTo(OutputStream out)
writeTo in interface MatrixBasepublic static String toString(ReadableIntRationalMatrix mx)
public static void writeTo(Writer writer,
ReadableIntRationalMatrix mx)
public static void writeTo(OutputStream out,
ReadableIntRationalMatrix mx)
public String toMultilineString()
toMultilineString in interface MatrixBasepublic void writeToMultiline(Writer writer)
writeToMultiline in interface MatrixBasepublic void writeToMultiline(OutputStream out)
writeToMultiline in interface MatrixBasepublic static String toMultilineString(ReadableIntRationalMatrix mx)
public static void writeToMultiline(Writer writer,
ReadableIntRationalMatrix mx)
public static void writeToMultiline(OutputStream out,
ReadableIntRationalMatrix mx)
protected static String toString(ReadableIntRationalMatrix mx,
String prefix,
String postfix,
String rowPrefix,
String rowPostfix,
String rowSeparator,
String colPrefix,
String colPostfix,
String colSeparator)
protected static void writeTo(PrintWriter writer,
ReadableIntRationalMatrix mx,
String prefix,
String postfix,
String rowPrefix,
String rowPostfix,
String rowSeparator,
String colPrefix,
String colPostfix,
String colSeparator)
public DefaultIntRationalMatrix clone()
clone in interface IntRationalMatrixclone in interface MatrixBaseclone in interface ReadableMatrixclone in interface WritableMatrixclone in class Object
public DefaultIntRationalMatrix newInstance(int rows,
int cols)
newInstance in interface IntRationalMatrixnewInstance in interface MatrixBasenewInstance in interface ReadableMatrixnewInstance in interface WritableMatrix
public DefaultIntRationalMatrix newInstance(Number[][] data,
boolean rowsInDim1)
newInstance in interface IntRationalMatrixnewInstance in interface MatrixBasenewInstance in interface ReadableMatrixnewInstance in interface WritableMatrixpublic IntRationalMatrix toIntRationalMatrix(boolean enforceNewInstance)
toIntRationalMatrix in interface ReadableIntRationalMatrixpublic IntRationalMatrix toWritableMatrix(boolean enforceNewInstance)
toWritableMatrix in interface ReadableMatrixpublic IntRationalMatrix toReadableMatrix(boolean enforceNewInstance)
toReadableMatrix in interface WritableMatrixpublic DoubleMatrix toDoubleMatrix(boolean enforceNewInstance)
toDoubleMatrix in interface ReadableDoubleMatrixpublic LongRationalMatrix toLongRationalMatrix(boolean enforceNewInstance)
toLongRationalMatrix in interface ReadableLongRationalMatrixpublic BigIntegerRationalMatrix toBigIntegerRationalMatrix(boolean enforceNewInstance)
toBigIntegerRationalMatrix in interface ReadableBigIntegerRationalMatrixpublic double[] toDoubleArray()
toDoubleArray in interface ReadableDoubleMatrixpublic void toArray(double[] array)
toArray in interface ReadableDoubleMatrixpublic double[] getDoubleColumn(int col)
getDoubleColumn in interface ReadableDoubleMatrixpublic double[][] getDoubleColumns()
getDoubleColumns in interface ReadableDoubleMatrixpublic double[] getDoubleRow(int row)
getDoubleRow in interface ReadableDoubleMatrixpublic double[][] getDoubleRows()
getDoubleRows in interface ReadableDoubleMatrixpublic Number[][] getNumberRows()
getNumberRows in interface ReadableMatrix
public void addRowToOtherRow(int srcRow,
int srcFactor,
int dstRow,
int dstFactor)
addRowToOtherRow in interface WritableIntMatrix
public void addRowToOtherRow(int srcRow,
int srcNumerator,
int srcDenominator,
int dstRow,
int dstNumerator,
int dstDenominator)
addRowToOtherRow in interface WritableIntRationalMatrix
public void add(int row,
int col,
int value)
add in interface WritableIntMatrix
public void add(int row,
int col,
int numerator,
int denominator)
add in interface WritableIntRationalMatrix
public void multiply(int row,
int col,
int factor)
multiply in interface WritableIntMatrix
public void multiply(int row,
int col,
int numerator,
int denominator)
multiply in interface WritableIntRationalMatrix
public void multiplyRow(int row,
int factor)
multiplyRow in interface WritableIntMatrix
public void multiplyRow(int row,
int numerator,
int denominator)
multiplyRow in interface WritableIntRationalMatrixpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
public IntRationalMatrix subIntRationalMatrix(int rowStart,
int rowEnd,
int colStart,
int colEnd)
subIntRationalMatrix in interface ReadableIntRationalMatrix
public LongRationalMatrix subLongRationalMatrix(int rowStart,
int rowEnd,
int colStart,
int colEnd)
subLongRationalMatrix in interface ReadableLongRationalMatrix
public BigIntegerRationalMatrix subBigIntegerRationalMatrix(int rowStart,
int rowEnd,
int colStart,
int colEnd)
subBigIntegerRationalMatrix in interface ReadableBigIntegerRationalMatrix
public DoubleMatrix subDoubleMatrix(int rowStart,
int rowEnd,
int colStart,
int colEnd)
subDoubleMatrix in interface ReadableDoubleMatrixpublic boolean reduce()
RationalMatrix
reduce in interface RationalMatrixpublic boolean reduceRow(int row)
RationalMatrix
reduceRow in interface RationalMatrix
public boolean reduceValueAt(int row,
int col)
RationalMatrix
reduceValueAt in interface RationalMatrixpublic DefaultIntRationalMatrix transpose()
transpose in interface IntRationalMatrixtranspose in interface MatrixBasetranspose in interface ReadableMatrixtranspose in interface WritableMatrix
public void negate(int row,
int col)
negate in interface WritableMatrix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||