|
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.MathVector
The class of vectors (in a linear algebra sense) for matrix math. 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 Number[] |
realValues
The values are stored in an array |
protected int |
size
Size is the number of elements in the vector |
Fields inherited from class com.klg.jclass.util.formulae.MathValue |
dataFormat |
Constructor Summary | |
MathVector()
Create a default vector (all entries initialised to 0) |
|
MathVector(double[] values)
Create a vector from an array of double values |
|
MathVector(int[] values)
Create a vector from an array of integer values |
|
MathVector(Number[] values)
Create a vector from an array of Numbers |
Method Summary | |
com.klg.jclass.util.formulae.Expression |
getValueAt(int index)
Retrieve the value at a particular index in the vector |
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 index,
Number value)
Set the value at a particular index in the vector |
String |
toString()
Output the value of this vector as a string |
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 size
Constructor Detail |
public MathVector()
public MathVector(double[] values)
public MathVector(int[] values)
public MathVector(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 index)
index
- The location at which to find the value
public void setValueAt(int index, Number value)
index
- The location at which to store the valuevalue
- 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 |