|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.uib.cipr.matrix.AbstractVector
no.uib.cipr.matrix.distributed.DistVector
public class DistVector
Distributed memory vector
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface no.uib.cipr.matrix.Vector |
|---|
Vector.Norm |
| Field Summary |
|---|
| Fields inherited from class no.uib.cipr.matrix.AbstractVector |
|---|
size |
| Constructor Summary | |
|---|---|
DistVector(int size,
Communicator comm,
Vector x)
Constructor for DistVector |
|
| Method Summary | |
|---|---|
DistVector |
add(double alpha,
Vector y)
x = alpha*y + x |
void |
add(int index,
double value)
x(index) += value |
DistVector |
copy()
Creates a deep copy of the vector |
double |
dot(Vector y)
xT*y |
double |
get(int index)
Returns x(index) |
Communicator |
getCommunicator()
Gets the communicator associated with this vector |
Vector |
getLocal()
Returns the local part of the vector |
int[] |
getOwnerships()
Returns which indices are owned by which ranks. |
java.util.Iterator<VectorEntry> |
iterator()
|
boolean |
local(int index)
Returns true if the insertion index is local to this rank, and no communication is needed afterwards. |
protected double |
norm1()
|
protected double |
norm2_robust()
|
protected double |
norm2()
|
protected double |
normInf()
|
DistVector |
scale(double alpha)
x=alpha*x |
DistVector |
set(double alpha,
Vector y)
x=alpha*y |
void |
set(int index,
double value)
x(index) = value |
DistVector |
zero()
Zeros all the entries in the vector, while preserving any underlying structure |
| Methods inherited from class no.uib.cipr.matrix.AbstractVector |
|---|
add, check, checkSize, norm, set, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DistVector(int size,
Communicator comm,
Vector x)
size - Global vector sizecomm - Communicator to usex - Local vector, its size cannot exceed the global size, and the
sum of the local vector sizes must equal the global vector
size (this is checked)| Method Detail |
|---|
public void set(int index,
double value)
Vectorx(index) = value
set in interface Vectorset in class AbstractVector
public void add(int index,
double value)
Vectorx(index) += value
add in interface Vectoradd in class AbstractVectorpublic double get(int index)
Vectorx(index)
get in interface Vectorget in class AbstractVectorpublic DistVector copy()
Vector
copy in interface Vectorcopy in class AbstractVectorpublic DistVector zero()
Vector
zero in interface Vectorzero in class AbstractVectorpublic DistVector scale(double alpha)
Vectorx=alpha*x
scale in interface Vectorscale in class AbstractVector
public DistVector set(double alpha,
Vector y)
Vectorx=alpha*y
set in interface Vectorset in class AbstractVector
public DistVector add(double alpha,
Vector y)
Vectorx = alpha*y + x
add in interface Vectoradd in class AbstractVectorpublic double dot(Vector y)
VectorxT*y
dot in interface Vectordot in class AbstractVectorprotected double norm1()
norm1 in class AbstractVectorprotected double norm2_robust()
norm2_robust in class AbstractVectorprotected double norm2()
norm2 in class AbstractVectorprotected double normInf()
normInf in class AbstractVectorpublic Vector getLocal()
public int[] getOwnerships()
n[comm.rank()] (inclusive) to
n[comm.rank()+1] (exclusive)
public boolean local(int index)
public java.util.Iterator<VectorEntry> iterator()
iterator in interface java.lang.Iterable<VectorEntry>iterator in class AbstractVectorpublic Communicator getCommunicator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||