|
|||||||||
| 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.AbstractBooleanVector
public abstract class AbstractBooleanVector
The AbstractBooleanVector class encapsulates vectors containing booleans.
| Constructor Summary | |
|---|---|
protected |
AbstractBooleanVector(int dim)
Creates a new AbstractBooleanVector object. |
| Method Summary | |
|---|---|
AbstractBooleanVector |
add(AbstractBooleanVector v)
Returns the addition of this vector and another. |
AbstractBooleanVector |
and(AbstractBooleanVector v)
Returns the and of this vector and another. |
BooleanVector |
andNot(BooleanVector v)
Clears all of the Boolean in receiver whose corresponding bit is set in the other BooleanVector (A = A \ B). |
boolean |
equals(java.lang.Object a)
Compares two integer vectors for equality. |
AbstractBooleanVector |
getColumn(int j)
Returns the ith column. |
Boolean |
getElement(int n)
Returns an element of this vector. |
abstract boolean |
getPrimitiveElement(int n)
Returns an element of this vector (this is the fastest way of getting an element for this kind of matrix). |
AbstractBooleanVector |
getRow(int i)
Returns the ith row. |
AbstractBooleanVector |
getSubVector(int k1,
int k2)
Computes a sub vector from the parameters index. |
abstract int |
hashCode()
Returns a hashcode for this NON EMPTY vector. |
AbstractBooleanVector |
mapElements(PrimitiveMapping f)
Applies a function on all the vector components. |
AbelianGroup.Member |
negate()
Returns the negative (not) of this vector. |
AbstractBooleanVector |
not()
Returns the not of this vector and another. |
AbstractBooleanVector |
or(AbstractBooleanVector v)
Returns the or of this vector and another. |
static AbstractBooleanVector |
read(java.io.BufferedReader input)
Read a vector from a stream. |
AbstractBooleanVector |
reverse()
Invert vector elements order from the last to the first. |
VectorSpace.Member |
scalarDivide(Field.Member x)
Returns the division of this matrix by a scalar. |
AbstractBooleanVector |
scalarMultiply(boolean x)
Returns the multiplication of this vector by a scalar. |
int |
scalarProduct(AbstractBooleanVector v)
Returns the scalar product of this vector and another. |
void |
setAllElements(boolean r)
Sets the value of all elements of the vector. |
void |
setColumn(int j,
AbstractBooleanVector v)
Returns the ith column. |
abstract void |
setElement(int n,
boolean x)
Sets the value of an element of this vector. |
void |
setElement(int n,
Boolean x)
Sets the value of a component of this vector. |
void |
setRow(int i,
AbstractBooleanVector v)
Returns the ith row. |
AbstractBooleanVector |
setSubVector(int k,
AbstractBooleanVector v)
Set a sub vector. |
AbstractBooleanVector |
subtract(AbstractBooleanVector v)
Returns the subtraction of this vector by another. |
AbstractComplexVector |
toComplexVector()
Converts this vector to a complex vector. |
AbstractDoubleVector |
toDoubleVector()
Converts this vector to a double vector. |
AbstractIntegerVector |
toIntegerVector()
Converts this vector to a integer vector. |
Matrix |
toMatrix()
Projects the vector to the corresponding (n, 1) matrix class. |
boolean[] |
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! |
AbstractBooleanVector |
xor(AbstractBooleanVector v)
Returns the xor of this vector and another. |
| 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, subtract |
| Methods inherited from interface org.jscience.mathematics.algebraic.fields.Ring.Member |
|---|
multiply |
| Constructor Detail |
|---|
protected AbstractBooleanVector(int dim)
dim - DOCUMENT ME!| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic abstract int hashCode()
hashCode in class java.lang.Objectpublic AbstractIntegerVector toIntegerVector()
public AbstractDoubleVector toDoubleVector()
public AbstractComplexVector toComplexVector()
public abstract boolean getPrimitiveElement(int n)
n - index of the vector element.
public Boolean getElement(int n)
getElement in interface VectorgetElement in class AbstractVectorn - index of the vector element.
public AbstractBooleanVector getRow(int i)
i - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!public AbstractBooleanVector getColumn(int j)
j - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!
public void setRow(int i,
AbstractBooleanVector v)
public void setColumn(int j,
AbstractBooleanVector v)
public abstract void setElement(int n,
boolean x)
n - index of the vector elementx - an integer
public void setElement(int n,
Boolean x)
n - index of the vector componentx - a boolean
IllegalDimensionException - If attempting to access an invalid
component.public void setAllElements(boolean r)
r - a boolean elementpublic boolean equals(java.lang.Object a)
equals in class java.lang.Objecta - an integer vector
public VectorSpace.Member scalarDivide(Field.Member x)
x - DOCUMENT ME!
java.lang.IllegalArgumentException - DOCUMENT ME!public Matrix transpose()
public AbstractBooleanVector and(AbstractBooleanVector v)
v - an boolean vector
public BooleanVector andNot(BooleanVector v)
v - a BooleanVector with which to mask the receiver.
java.lang.IllegalArgumentException - if size() > other.size().public AbstractBooleanVector or(AbstractBooleanVector v)
v - an boolean vector
public AbstractBooleanVector not()
public AbstractBooleanVector xor(AbstractBooleanVector v)
v - an boolean vector
public AbelianGroup.Member negate()
public AbstractBooleanVector add(AbstractBooleanVector v)
v - an boolean vector
public AbstractBooleanVector subtract(AbstractBooleanVector v)
v - an boolean vector
public AbstractBooleanVector scalarMultiply(boolean x)
x - an boolean
public int scalarProduct(AbstractBooleanVector v)
v - an boolean vector
public AbstractBooleanVector reverse()
public AbstractBooleanVector getSubVector(int k1,
int k2)
k1 - the beginning indexk2 - the finishing index
public AbstractBooleanVector setSubVector(int k,
AbstractBooleanVector v)
k - Initial row index to offset the patching vectorv - the patching vectorpublic AbstractBooleanVector mapElements(PrimitiveMapping f)
f - a user-defined function.
public boolean[] toPrimitiveArray()
public Matrix toMatrix()
public static AbstractBooleanVector 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 | ||||||||