|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.algebraic.AbstractHypermatrix
org.jscience.mathematics.algebraic.AbstractMatrix
org.jscience.mathematics.algebraic.AbstractVector
org.jscience.mathematics.algebraic.matrices.AbstractIntegerVector
public abstract class AbstractIntegerVector
The AbstractIntegerVector class encapsulates vectors containing integers.
| Constructor Summary | |
|---|---|
protected |
AbstractIntegerVector(int dim)
Creates a new AbstractIntegerVector object. |
| Method Summary | |
|---|---|
AbstractDoubleVector |
abs()
Applies the abs function on all the vector components. |
AbstractIntegerVector |
add(AbstractIntegerVector v)
Returns the addition of this vector and another. |
boolean |
equals(java.lang.Object obj)
Compares two Integer vectors for equality. |
boolean |
equals(java.lang.Object obj,
double tol)
|
AbstractIntegerVector |
getColumn(int j)
Returns the ith column. |
Integer |
getElement(int n)
Returns an element of this vector. |
abstract int |
getPrimitiveElement(int n)
Returns an element of this vector (this is the fastest way of getting an element for this kind of matrix). |
AbstractIntegerVector |
getRow(int i)
Returns the ith row. |
AbstractIntegerVector |
getSubVector(int k1,
int k2)
Computes a sub vector from the parameters index. |
int |
hashCode()
Returns a hashcode for this NON EMPTY vector. |
int |
infNorm()
Returns the l -norm. |
AbstractDoubleVector |
mapElements(PrimitiveMapping f)
Applies a function on all the vector components. |
int |
mass()
Returns the mass. |
double |
max()
Gets the max of the vector components. |
double |
mean()
Gets the mean of the vector components. |
double |
min()
Gets the min of the vector components. |
Ring.Member |
multiply(Ring.Member r)
The multiplication law. |
double |
norm()
Returns the l2-norm (magnitude). |
double |
norm(int n)
Returns the ln-norm. |
static AbstractIntegerVector |
read(java.io.BufferedReader input)
Read a vector from a stream. |
AbstractIntegerVector |
reverse()
Invert vector elements order from the last to the first. |
VectorSpace.Member |
scalarDivide(Field.Member x)
Returns the division of this vector by a scalar. |
AbstractIntegerVector |
scalarMultiply(int x)
Returns the multiplication of this vector by a scalar. |
int |
scalarProduct(AbstractIntegerVector v)
Returns the scalar product of this vector and another. |
void |
setAllElements(int r)
Sets the value of all elements of the vector. |
void |
setColumn(int j,
AbstractIntegerVector v)
Returns the ith column. |
abstract void |
setElement(int n,
int x)
Sets the value of an element of this vector. |
void |
setElement(int n,
Integer x)
Sets the value of a component of this vector. |
void |
setRow(int i,
AbstractIntegerVector v)
Returns the ith row. |
AbstractIntegerVector |
setSubVector(int k,
AbstractIntegerVector v)
Set a sub vector. |
double |
standardDeviation()
Computes the (bias-corrected sample) standard deviation . |
AbstractIntegerVector |
subtract(AbstractIntegerVector v)
Returns the subtraction of this vector by another. |
int |
sumSquares()
Returns the sum of the squares of the components. |
IntegerMatrix |
tensorProduct(AbstractIntegerVector v)
Returns the tensor product of this vector and another. |
AbstractComplexVector |
toComplexVector()
Converts this vector to a complex vector. |
AbstractDoubleVector |
toDoubleVector()
Converts this vector to a double vector. |
Matrix |
toMatrix()
Projects the vector to the corresponding (n, 1) matrix class. |
int[] |
toPrimitiveArray()
Projects the vector to an array. |
java.lang.String |
toString()
Returns a comma delimited string representing the value of this vector. |
Matrix |
transpose()
DOCUMENT ME! |
double |
variance()
Computes the (bias-corrected sample) variance. |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractVector |
|---|
getDimension, getElement, getInvalidElementMsg, toArray, toArray |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractMatrix |
|---|
getElement, getInvalidElementMsg, numColumns, numRows, print, print, print, print, toArray |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractHypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jscience.mathematics.algebraic.Matrix |
|---|
numColumns, numRows, toArray |
| Methods inherited from interface org.jscience.mathematics.algebraic.Hypermatrix |
|---|
getDimensions, getElement, numDimensions, numElements, numElements, toArray |
| Methods inherited from interface org.jscience.mathematics.algebraic.modules.Module.Member |
|---|
scalarMultiply |
| Methods inherited from interface org.jscience.mathematics.algebraic.groups.AbelianGroup.Member |
|---|
add, negate, subtract |
| Constructor Detail |
|---|
protected AbstractIntegerVector(int dim)
dim - DOCUMENT ME!| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic AbstractDoubleVector toDoubleVector()
public AbstractComplexVector toComplexVector()
public abstract int getPrimitiveElement(int n)
n - index of the vector element.
public Integer getElement(int n)
getElement in interface VectorgetElement in class AbstractVectorn - index of the vector element.
public AbstractIntegerVector getRow(int i)
i - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!public AbstractIntegerVector getColumn(int j)
j - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!
public void setRow(int i,
AbstractIntegerVector v)
public void setColumn(int j,
AbstractIntegerVector v)
public abstract void setElement(int n,
int x)
n - index of the vector elementx - an integer
public void setElement(int n,
Integer x)
n - index of the vector componentx - an integer
IllegalDimensionException - If attempting to access an invalid
component.public void setAllElements(int r)
r - a int elementpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - a Integer vector
public boolean equals(java.lang.Object obj,
double tol)
public int sumSquares()
public int mass()
public double norm(int n)
n - DOCUMENT ME!
public double norm()
public int infNorm()
-norm.
public AbstractDoubleVector abs()
public double min()
public double max()
public double mean()
public double variance()
public double standardDeviation()
public Matrix transpose()
public Ring.Member multiply(Ring.Member r)
Ring.Member
r - a ring member
public VectorSpace.Member scalarDivide(Field.Member x)
x - DOCUMENT ME!
java.lang.IllegalArgumentException - DOCUMENT ME!public AbstractIntegerVector add(AbstractIntegerVector v)
v - an integer vector
public AbstractIntegerVector subtract(AbstractIntegerVector v)
v - an integer vector
public AbstractIntegerVector scalarMultiply(int x)
x - an integer
public int scalarProduct(AbstractIntegerVector v)
v - an integer vector
public IntegerMatrix tensorProduct(AbstractIntegerVector v)
v - DOCUMENT ME!
public AbstractIntegerVector reverse()
public AbstractIntegerVector getSubVector(int k1,
int k2)
k1 - the beginning indexk2 - the finishing index
public AbstractIntegerVector setSubVector(int k,
AbstractIntegerVector v)
k - Initial row index to offset the patching vectorv - the patching vectorpublic AbstractDoubleVector mapElements(PrimitiveMapping f)
f - a user-defined function.
public int[] toPrimitiveArray()
public Matrix toMatrix()
public static AbstractIntegerVector read(java.io.BufferedReader input)
throws java.io.IOException
input - the input stream.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||