|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSciLib.Math.booleanVector
public class booleanVector
This class defines a dynamic vector of type intger.
| Constructor Summary | |
|---|---|
booleanVector()
Allocates an empty vector. |
|
booleanVector(boolean[] vec)
Allocates a vector from the array vec. |
|
booleanVector(booleanVector x)
Make a copy of the vector x. |
|
booleanVector(int n)
Allocates a vector of size n with initiařized values 0. |
|
| Method Summary | |
|---|---|
void |
add(boolean x)
Add an element of value x to the vector. |
void |
append(booleanVector x)
Append an booleanVector x to this vector |
void |
concat(booleanVector x)
Append a booleanVector x to this vector |
static booleanVector |
copy(booleanVector x)
Make a copy of the vector x. |
boolean |
elementAt(int i)
return the value of vector at index i. |
boolean[] |
getData()
Make an boolean array that contains all data of the vector. |
static booleanVector |
ones(int n)
Make a booleanVector of length n whose elements have value true. |
void |
print()
Print all elements of the vector using System.out. |
void |
resize(int n)
Change the size of the vector to n. |
void |
setElementAt(boolean x,
int i)
change the value of element at index i with the integer x. |
int |
size()
Return the length of the vector. |
booleanVector |
subvector(int from)
make a vector whose elements are equal to elements of this vector with the indexes from an integer "from" to the end of this vector. |
booleanVector |
subvector(int from,
int to)
Make a vector whose elements are equal to elements of this vector with the indexes from an integer "from" to an intger "to". |
java.lang.String |
toString()
create a String that contains the elements of the vector. |
void |
trimToSize()
Remove all the unused elements of the vector. |
static booleanVector |
zeros(int n)
Make a booleanVector of length n whose elements have value false. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public booleanVector()
public booleanVector(int n)
n - The length of the vectorpublic booleanVector(boolean[] vec)
vec - An array of type doublepublic booleanVector(booleanVector x)
x - An booleanVector| Method Detail |
|---|
public static booleanVector copy(booleanVector x)
x - An booleanVectorpublic void add(boolean x)
x - An integer valuepublic void append(booleanVector x)
x - A vectorpublic void concat(booleanVector x)
x - A vector
public boolean elementAt(int i)
throws java.lang.ArrayIndexOutOfBoundsException
i - An integer
java.lang.ArrayIndexOutOfBoundsExceptionpublic boolean[] getData()
public static booleanVector ones(int n)
public void print()
public void resize(int n)
n - The new length of the vector
public void setElementAt(boolean x,
int i)
throws java.lang.ArrayIndexOutOfBoundsException
x - An boolean valuei - An index integer
java.lang.ArrayIndexOutOfBoundsExceptionpublic final int size()
public booleanVector subvector(int from,
int to)
from - start indexto - end index
public booleanVector subvector(int from)
from - start index
public java.lang.String toString()
toString in class java.lang.Objectpublic void trimToSize()
public static booleanVector zeros(int n)
n - An integer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||