Package samer.maths

Class VVector

  • java.lang.Object
    • Viewable
      • samer.maths.VVector
  • All Implemented Interfaces:
    Vec
    Direct Known Subclasses:
    RowColumn


    public class VVector
    extends Viewable
    implements Vec
    A Viewable Vec. The default viewer displays only the name and size of the vector, but the attached Agent allows creation of other types of viewer.
    • Constructor Summary

      Constructors 
      Modifier Constructor and Description
      protected VVector() 
        VVector(java.lang.String nm, int n) 
        VVector(Node node, double[] x) 
        VVector(Node node, int n) 
        VVector(Node node, Vec v) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addSaver() 
      double[] array() 
      void copyFrom(double[] y) 
      void copyTo(double[] y) 
      void execute(java.lang.String cmd, Environment env) 
      void getCommands(Registry r) 
      Vec getVec() 
      Viewer getViewer() 
      Vec.Iterator iterator() 
      void load(java.io.InputStream in) 
      Mat mat() 
      void print(java.io.PrintWriter prn) 
      void read(java.io.Reader input)
      Reads a line of numbers from the reader and stores in the Vec
      void save(java.io.OutputStream out) 
      int size() 
      void write(java.io.Writer w)
      Write the given Vec to a PrintWriter as one line of text, consisting of space delimited numbers.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VVector

        protected VVector()
      • VVector

        public VVector(java.lang.String nm,
                       int n)
      • VVector

        public VVector(Node node,
                       double[] x)
      • VVector

        public VVector(Node node,
                       int n)
      • VVector

        public VVector(Node node,
                       Vec v)
    • Method Detail

      • addSaver

        public void addSaver()
      • size

        public int size()
        Specified by:
        size in interface Vec
      • mat

        public Mat mat()
        Specified by:
        mat in interface Vec
      • array

        public double[] array()
        Specified by:
        array in interface Vec
      • getVec

        public Vec getVec()
      • getViewer

        public Viewer getViewer()
      • copyFrom

        public void copyFrom(double[] y)
      • copyTo

        public void copyTo(double[] y)
      • save

        public void save(java.io.OutputStream out)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • load

        public void load(java.io.InputStream in)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • write

        public void write(java.io.Writer w)
        Write the given Vec to a PrintWriter as one line of text, consisting of space delimited numbers.
      • print

        public void print(java.io.PrintWriter prn)
      • read

        public void read(java.io.Reader input)
                  throws java.io.IOException
        Reads a line of numbers from the reader and stores in the Vec
        Throws:
        java.io.IOException
      • getCommands

        public void getCommands(Registry r)
      • execute

        public void execute(java.lang.String cmd,
                            Environment env)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception