Class DistVector

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<VectorEntry>, Vector

    @Deprecated
    public class DistVector
    extends AbstractVector
    Deprecated.
    the no.uib.cipr.matrix.distributed package 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
    • 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
      DistVector add​(double alpha, Vector y)
      Deprecated.
      x = alpha*y + x
      void add​(int index, double value)
      Deprecated.
      x(index) += value
      DistVector copy()
      Deprecated.
      Creates a deep copy of the vector
      double dot​(Vector y)
      Deprecated.
      xT*y
      double get​(int index)
      Deprecated.
      Returns x(index)
      Communicator getCommunicator()
      Deprecated.
      Gets the communicator associated with this vector
      Vector getLocal()
      Deprecated.
      Returns the local part of the vector
      int[] getOwnerships()
      Deprecated.
      Returns which indices are owned by which ranks.
      java.util.Iterator<VectorEntry> iterator()
      Deprecated.
       
      boolean local​(int index)
      Deprecated.
      Returns true if the insertion index is local to this rank, and no communication is needed afterwards.
      protected double norm1()
      Deprecated.
       
      protected double norm2()
      Deprecated.
       
      protected double norm2_robust()
      Deprecated.
       
      protected double normInf()
      Deprecated.
       
      DistVector scale​(double alpha)
      Deprecated.
      x=alpha*x
      DistVector set​(double alpha, Vector y)
      Deprecated.
      x=alpha*y
      void set​(int index, double value)
      Deprecated.
      x(index) = value
      DistVector zero()
      Deprecated.
      Zeros all the entries in the vector, while preserving any underlying structure
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • DistVector

        public DistVector​(int size,
                          Communicator comm,
                          Vector x)
        Deprecated.
        Constructor for DistVector
        Parameters:
        size - Global vector size
        comm - Communicator to use
        x - 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: Vector
        x(index) = value
        Specified by:
        set in interface Vector
        Overrides:
        set in class AbstractVector
      • add

        public void add​(int index,
                        double value)
        Deprecated.
        Description copied from interface: Vector
        x(index) += value
        Specified by:
        add in interface Vector
        Overrides:
        add in class AbstractVector
      • get

        public double get​(int index)
        Deprecated.
        Description copied from interface: Vector
        Returns x(index)
        Specified by:
        get in interface Vector
        Overrides:
        get in class AbstractVector
      • zero

        public DistVector zero()
        Deprecated.
        Description copied from interface: Vector
        Zeros all the entries in the vector, while preserving any underlying structure
        Specified by:
        zero in interface Vector
        Overrides:
        zero in class AbstractVector
      • 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 indices n[comm.rank()] (inclusive) to n[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.
      • getCommunicator

        public Communicator getCommunicator()
        Deprecated.
        Gets the communicator associated with this vector