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:
java.io.Serializable,java.lang.Iterable<VectorEntry>,Vector
@Deprecated public class DistVector extends AbstractVector
Deprecated.theno.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.Distributed memory vector- See Also:
- Serialized Form
-
-
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
Constructors Constructor Description DistVector(int size, Communicator comm, Vector x)Deprecated.Constructor for DistVector
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DistVectoradd(double alpha, Vector y)Deprecated.x = alpha*y + xvoidadd(int index, double value)Deprecated.x(index) += valueDistVectorcopy()Deprecated.Creates a deep copy of the vectordoubledot(Vector y)Deprecated.xT*ydoubleget(int index)Deprecated.Returnsx(index)CommunicatorgetCommunicator()Deprecated.Gets the communicator associated with this vectorVectorgetLocal()Deprecated.Returns the local part of the vectorint[]getOwnerships()Deprecated.Returns which indices are owned by which ranks.java.util.Iterator<VectorEntry>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 doublenorm2_robust()Deprecated.protected doublenormInf()Deprecated.DistVectorscale(double alpha)Deprecated.x=alpha*xDistVectorset(double alpha, Vector y)Deprecated.x=alpha*yvoidset(int index, double value)Deprecated.x(index) = valueDistVectorzero()Deprecated.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
-
-
-
-
Constructor Detail
-
DistVector
public DistVector(int size, Communicator comm, Vector x)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 Detail
-
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
public DistVector copy()
Deprecated.Description copied from interface:VectorCreates a deep copy of the vector- Specified by:
copyin interfaceVector- Overrides:
copyin classAbstractVector
-
zero
public DistVector 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
public DistVector scale(double alpha)
Deprecated.Description copied from interface:Vectorx=alpha*x- Specified by:
scalein interfaceVector- Overrides:
scalein classAbstractVector- Returns:
- x
-
set
public DistVector set(double alpha, Vector y)
Deprecated.Description copied from interface:Vectorx=alpha*y- Specified by:
setin interfaceVector- Overrides:
setin classAbstractVector- Returns:
- x
-
add
public DistVector add(double alpha, Vector y)
Deprecated.Description copied from interface:Vectorx = alpha*y + x- Specified by:
addin interfaceVector- Overrides:
addin classAbstractVector- Returns:
- x
-
dot
public double dot(Vector y)
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
public Vector 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
public java.util.Iterator<VectorEntry> iterator()
Deprecated.- Specified by:
iteratorin interfacejava.lang.Iterable<VectorEntry>- Overrides:
iteratorin classAbstractVector
-
getCommunicator
public Communicator getCommunicator()
Deprecated.Gets the communicator associated with this vector
-
-