Package samer.maths

Class RowColumn

  • All Implemented Interfaces:
    java.util.Observer, Mat, Vec


    public class RowColumn
    extends VVector
    implements Mat, java.util.Observer
    Looks like a vector externally, but reads data from a row or column of a matrix. Provides commands for setting which row or column to use, and for switching between rows and columns.
    • Field Detail

      • FLIPPED

        public static final java.lang.Object FLIPPED
      • SWITCHED

        public static final java.lang.Object SWITCHED
    • Constructor Detail

      • RowColumn

        public RowColumn(Node n,
                         Matrix A)
      • RowColumn

        public RowColumn(Matrix A)
    • Method Detail

      • array

        public double[] array()
        Specified by:
        array in interface Vec
        Overrides:
        array in class VVector
      • mat

        public Mat mat()
        Specified by:
        mat in interface Vec
        Overrides:
        mat in class VVector
      • width

        public int width()
        Specified by:
        width in interface Mat
      • height

        public int height()
        Specified by:
        height in interface Mat
      • get

        public double get(int i,
                          int j)
        Specified by:
        get in interface Mat
      • set

        public void set(int i,
                        int j,
                        double t)
        Specified by:
        set in interface Mat
      • dispose

        public void dispose()
      • setNum

        public void setNum(int n)
      • setRow

        public void setRow(int r)
      • setColumn

        public void setColumn(int r)
      • getCommands

        public void getCommands(Agent.Registry r)
        Overrides:
        getCommands in class VVector
      • execute

        public void execute(java.lang.String cmd,
                            Environment env)
                     throws java.lang.Exception
        Overrides:
        execute in class VVector
        Throws:
        java.lang.Exception
      • notifyObservers

        public void notifyObservers(java.lang.Object s)
      • update

        public void update(java.util.Observable o,
                           java.lang.Object s)
        Specified by:
        update in interface java.util.Observer