Class Octave


  • public class Octave
    extends java.lang.Object
    • Field Detail

      • SEARCH

        public static java.lang.String[] SEARCH
      • input

        private java.io.BufferedReader input
      • output

        private java.io.BufferedWriter output
      • error

        private java.io.BufferedReader error
      • octaveProcess

        private java.lang.Process octaveProcess
      • running

        private boolean running
      • octave

        private static Octave octave
      • pathToOctave

        private static java.lang.String pathToOctave
    • Constructor Detail

      • Octave

        private Octave​(java.lang.String pathToOctave)
                throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getInstance

        public static Octave getInstance()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getInstance

        public static Octave getInstance​(java.lang.String pathToOctave)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFromOctave

        private java.lang.String getFromOctave()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • execute

        public java.lang.String execute​(java.lang.String command)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shutdown

        public void shutdown()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • sendToOctave

        private void sendToOctave​(java.lang.String command)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setMatrix

        public void setMatrix​(java.lang.String label,
                              Matrix matrix)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • findOctave

        private static java.lang.String findOctave()
      • getMatrix

        public Matrix getMatrix​(java.lang.String label)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isAvailable

        public static boolean isAvailable()
      • plot

        public void plot​(Matrix matrix,
                         java.lang.String... format)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loglog

        public void loglog​(Matrix matrix,
                           java.lang.String... format)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • semilogx

        public void semilogx​(Matrix matrix,
                             java.lang.String... format)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • semilogy

        public void semilogy​(Matrix matrix,
                             java.lang.String... format)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • bar

        public void bar​(Matrix matrix,
                        java.lang.String... format)
                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • stairs

        public void stairs​(Matrix matrix,
                           java.lang.String... format)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • hist

        public void hist​(Matrix matrix,
                         java.lang.String... format)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • plot

        public void plot​(Matrix x,
                         Matrix y,
                         java.lang.String... format)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loglog

        public void loglog​(Matrix x,
                           Matrix y,
                           java.lang.String... format)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • semilogx

        public void semilogx​(Matrix x,
                             Matrix y,
                             java.lang.String... format)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • semilogy

        public void semilogy​(Matrix x,
                             Matrix y,
                             java.lang.String... format)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • bar

        public void bar​(Matrix x,
                        Matrix y,
                        java.lang.String... format)
                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • stairs

        public void stairs​(Matrix x,
                           Matrix y,
                           java.lang.String... format)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • hist

        public void hist​(Matrix x,
                         Matrix y,
                         java.lang.String... format)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • polar

        public void polar​(Matrix theta,
                          Matrix rho,
                          java.lang.String... format)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • contour

        public void contour​(Matrix z,
                            Matrix n,
                            Matrix x,
                            Matrix y,
                            java.lang.String... format)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • mesh

        public void mesh​(Matrix x,
                         Matrix y,
                         Matrix z,
                         java.lang.String... format)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toString

        public static java.lang.String toString​(java.lang.String[] strings)
      • getDouble

        public double getDouble​(java.lang.String label)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getLong

        public long getLong​(java.lang.String label)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getInt

        public int getInt​(java.lang.String label)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFloat

        public float getFloat​(java.lang.String label)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setDouble

        public void setDouble​(java.lang.String label,
                              double value)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setFloat

        public void setFloat​(java.lang.String label,
                             float value)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setInt

        public void setInt​(java.lang.String label,
                           int value)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setLong

        public void setLong​(java.lang.String label,
                            long value)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception