|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.util.formulae.MathValue | +--com.klg.jclass.util.formulae.MathMatrix
The class of matrices (we almost undoubtedly do not ever need to go beyond this point, since nobody in their right mind would ever try to do tensor math in a spreadsheet). NOTE: We probably do not need to implement this for the first version but I include it here as a potential consideration for future development
Field Summary | |
protected int |
columns
Rows and Columns define the number of entries in the matrix |
protected Number[][] |
realValues
The values are stored in an array |
protected int |
rows
Rows and Columns define the number of entries in the matrix |
Fields inherited from class com.klg.jclass.util.formulae.MathValue |
dataFormat |
Constructor Summary | |
MathMatrix()
Create a default matrix (all entries initialised to 0) |
|
MathMatrix(double[][] values)
Create a matrix from an array of double values |
|
MathMatrix(int[][] values)
Create a matrix from an array of integer values |
|
MathMatrix(Number[][] values)
Create a matrix from an array of Numbers |
Method Summary | |
com.klg.jclass.util.formulae.Expression |
getValueAt(int row,
int column)
Retrieve the value at a particular index in the matrix |
Number[][] |
matrixValue()
Get the contents of this MathValue as a matrix of Numbers |
Number |
numberValue()
Get the contents of this MathValue as a Number |
void |
setValueAt(int row,
int column,
Number value)
Set the value at a particular index in the matrix |
String |
toString()
Return a string representation of this value |
Number[] |
vectorValue()
Get the contents of this MathValue as a vector of Numbers |
Methods inherited from class com.klg.jclass.util.formulae.MathValue |
clone, evaluate, getDataFormat, setDataFormat |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Number[][] realValues
protected int rows
protected int columns
Constructor Detail |
public MathMatrix()
public MathMatrix(double[][] values)
public MathMatrix(int[][] values)
public MathMatrix(Number[][] values)
Method Detail |
public Number numberValue()
numberValue
in class MathValue
public Number[] vectorValue()
vectorValue
in class MathValue
public Number[][] matrixValue()
matrixValue
in class MathValue
public com.klg.jclass.util.formulae.Expression getValueAt(int row, int column)
public void setValueAt(int row, int column, Number value)
value
- The MathValue to store at the given locationpublic String toString()
toString
in class Object
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |