Package no.uib.cipr.matrix.distributed
Class DistVector
java.lang.Object
no.uib.cipr.matrix.AbstractVector
no.uib.cipr.matrix.distributed.DistVector
- All Implemented Interfaces:
Serializable,Iterable<VectorEntry>,Vector
Deprecated.
Distributed memory vector
- See Also:
-
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
ConstructorsConstructorDescriptionDistVector(int size, Communicator comm, Vector x) Deprecated.Constructor for DistVector -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.x = alpha*y + xvoidadd(int index, double value) Deprecated.x(index) += valuecopy()Deprecated.Creates a deep copy of the vectordoubleDeprecated.xT*ydoubleget(int index) Deprecated.Returnsx(index)Deprecated.Gets the communicator associated with this vectorgetLocal()Deprecated.Returns the local part of the vectorint[]Deprecated.Returns which indices are owned by which ranks.iterator()Deprecated.booleanlocal(int index) Deprecated.Returns true if the insertion index is local to this rank, and no communication is needed afterwards.protected doublenorm1()Deprecated.protected doublenorm2()Deprecated.protected doubleDeprecated.protected doublenormInf()Deprecated.scale(double alpha) Deprecated.x=alpha*xDeprecated.x=alpha*yvoidset(int index, double value) Deprecated.x(index) = valuezero()Deprecated.Zeros all the entries in the vector, while preserving any underlying structureMethods inherited from class no.uib.cipr.matrix.AbstractVector
add, check, checkSize, norm, set, size, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DistVector
Deprecated.Constructor for DistVector- Parameters:
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 Details
-
set
public void set(int index, double value) Deprecated.Description copied from interface:Vectorx(index) = value- Specified by:
setin interfaceVector- Overrides:
setin classAbstractVector
-
add
public void add(int index, double value) Deprecated.Description copied from interface:Vectorx(index) += value- Specified by:
addin interfaceVector- Overrides:
addin classAbstractVector
-
get
public double get(int index) Deprecated.Description copied from interface:VectorReturnsx(index)- Specified by:
getin interfaceVector- Overrides:
getin classAbstractVector
-
copy
Deprecated.Description copied from interface:VectorCreates a deep copy of the vector- Specified by:
copyin interfaceVector- Overrides:
copyin classAbstractVector
-
zero
Deprecated.Description copied from interface:VectorZeros all the entries in the vector, while preserving any underlying structure- Specified by:
zeroin interfaceVector- Overrides:
zeroin classAbstractVector
-
scale
Deprecated.Description copied from interface:Vectorx=alpha*x- Specified by:
scalein interfaceVector- Overrides:
scalein classAbstractVector- Returns:
- x
-
set
Deprecated.Description copied from interface:Vectorx=alpha*y- Specified by:
setin interfaceVector- Overrides:
setin classAbstractVector- Returns:
- x
-
add
Deprecated.Description copied from interface:Vectorx = alpha*y + x- Specified by:
addin interfaceVector- Overrides:
addin classAbstractVector- Returns:
- x
-
dot
Deprecated.Description copied from interface:VectorxT*y- Specified by:
dotin interfaceVector- Overrides:
dotin classAbstractVector
-
norm1
protected double norm1()Deprecated.- Overrides:
norm1in classAbstractVector
-
norm2_robust
protected double norm2_robust()Deprecated.- Overrides:
norm2_robustin classAbstractVector
-
norm2
protected double norm2()Deprecated.- Overrides:
norm2in classAbstractVector
-
normInf
protected double normInf()Deprecated.- Overrides:
normInfin classAbstractVector
-
getLocal
Deprecated.Returns the local part of the vector -
getOwnerships
public int[] getOwnerships()Deprecated.Returns which indices are owned by which ranks. The current rank owns the indicesn[comm.rank()](inclusive) ton[comm.rank()+1](exclusive) -
local
public boolean local(int index) Deprecated.Returns true if the insertion index is local to this rank, and no communication is needed afterwards. -
iterator
Deprecated.- Specified by:
iteratorin interfaceIterable<VectorEntry>- Overrides:
iteratorin classAbstractVector
-
getCommunicator
Deprecated.Gets the communicator associated with this vector
-
no.uib.cipr.matrix.distributedpackage has been deprecated because of a number of hard to fix concurrency bugs. It is distributed only for backwards compatibility, but is not recommended. The utility of this package is questionable, as it does not allow distribution of computation between JVMs or across a network. For many people, distributed computing of multiple matrices can be achieved at a user-level through the JPPF Framework. Users who need to deal with few very large matrices may wish to implement their own storage classes and solvers using JPPF, but this will not be supported directly in matrix-toolkits-java.