Class MRpeTest


  • public class MRpeTest
    extends java.lang.Object
    JUnit test for full Matrix Rp evaluator
    • Constructor Detail

      • MRpeTest

        public MRpeTest()
    • Method Detail

      • setUp

        @BeforeEach
        public void setUp()
      • testMRpeEval

        @Test
        public void testMRpeEval()
                          throws java.lang.Exception
        Tests basic operation of the RpEval class.
        Throws:
        java.lang.Exception
      • testRpSurf

        @Test
        public void testRpSurf()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testFunctionName

        @Test
        public void testFunctionName()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • instance_with_null_matrix_factory_works

        @Test
        public void instance_with_null_matrix_factory_works()
                                                     throws JepException
        Throws:
        JepException
      • instance_with_null_matrix_factory_fails_with_MatrixFunctions

        @Test
        public void instance_with_null_matrix_factory_fails_with_MatrixFunctions()
                                                                          throws JepException
        Throws:
        JepException
      • test_compile_Variable_Node

        @Test
        public void test_compile_Variable_Node()
      • testResultType

        @Test
        public void testResultType()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testVariableMatrix

        @Test
        public void testVariableMatrix()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testGood

        @Test
        public void testGood()
      • myAssertEquals

        public void myAssertEquals​(java.lang.String msg,
                                   java.lang.String actual,
                                   java.lang.String expected)
      • valueTest

        protected void valueTest​(java.lang.String expr,
                                 MrpRes expected)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • valueTest

        public void valueTest​(java.lang.String expr,
                              java.lang.String expected)
                       throws JepException
        Throws:
        JepException
      • complexValueTest

        public void complexValueTest​(java.lang.String expr,
                                     Complex expected,
                                     double tol)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • cleanTest

        public void cleanTest​(java.lang.String expr,
                              java.lang.String expected)
                       throws JepException
        Parses and cleans both expressions, test toString on both
        Parameters:
        expr -
        expected -
        Throws:
        JepException
      • cleanTestString

        public void cleanTestString​(java.lang.String expr,
                                    java.lang.String expected)
                             throws JepException
        Parses and cleans expr, test equal to expected string
        Parameters:
        expr -
        expected -
        Throws:
        JepException
      • set_scaler_variable_to_scaler

        @Test
        public void set_scaler_variable_to_scaler()
                                           throws JepException
        Throws:
        JepException
      • set_scaler_variable_to_one_element_vector

        @Test
        public void set_scaler_variable_to_one_element_vector()
                                                       throws JepException
        Throws:
        JepException
      • set_one_element_vector_to_vector

        @Test
        public void set_one_element_vector_to_vector()
                                              throws JepException
        Throws:
        JepException
      • setting_one_element_vector_to_scaler_fails

        @Test
        public void setting_one_element_vector_to_scaler_fails()
                                                        throws JepException
        Throws:
        JepException
      • set_vector_variable_to_vector

        @Test
        public void set_vector_variable_to_vector()
                                           throws JepException
        Throws:
        JepException
      • set_matrix_variable_to_2Darray

        @Test
        public void set_matrix_variable_to_2Darray()
                                            throws JepException
        Throws:
        JepException
      • testMRpSurf

        @Test
        public void testMRpSurf()
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testUnsetDimension

        @Test
        public void testUnsetDimension()
                                throws JepException
        Using a non matrix compatible set of operators/functions.
        Throws:
        JepException
      • duplicate_MrpVarRef_preserve_properties

        @Test
        public void duplicate_MrpVarRef_preserve_properties()
                                                     throws JepException
        Throws:
        JepException
      • getLightweightInstance_null_copies_varvalues

        @Test
        public void getLightweightInstance_null_copies_varvalues()
                                                          throws JepException
        Throws:
        JepException
      • getLightweightInstance_Jep_copies_varrefs__properties_values

        @Test
        public void getLightweightInstance_Jep_copies_varrefs__properties_values()
                                                                          throws JepException
        
         Variable x = jep.addVariable("x");
            	dimV.setVariableDimensions(x, Dimensions.SCALER);
            	MrpVarRef xref = mrpe.getVarRef(x);
            	mrpe.setVarValue(xref, 5.0);
            	
            	ComponentSet cs = new LightWeightComponentSet(jep);
            	XJep lwj = new XJep(cs);     	
            	MrpEval neweval =  (MrpEval) mrpe.getLightWeightInstance(lwj);
            	
        
         
        Throws:
        JepException
      • normal_distribution

        @Test
        public void normal_distribution()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCMul_with_lightWeightInstance

        @Test
        public void testCMul_with_lightWeightInstance()
                                               throws JepException
        Throws:
        JepException
      • test_matrixFunctionI_with_lightWeightInstance_Jep

        @Test
        public void test_matrixFunctionI_with_lightWeightInstance_Jep()
                                                               throws JepException
        Throws:
        JepException
      • getVarRef_string_works_with_lightWeightInstance_Jep

        @Test
        public void getVarRef_string_works_with_lightWeightInstance_Jep()
                                                                 throws JepException
        Throws:
        JepException
      • getVarRef_variable_works_with_lightWeightInstance_Jep

        @Test
        public void getVarRef_variable_works_with_lightWeightInstance_Jep()
                                                                   throws JepException
        Throws:
        JepException
      • convertToVector_fails_with_lightWeightInstance_Jep

        @Test
        public void convertToVector_fails_with_lightWeightInstance_Jep()
                                                                throws JepException
        Throws:
        JepException
      • convertToVector_works_with_lightWeightInstance_Jep_with_matrix_factory

        @Test
        public void convertToVector_works_with_lightWeightInstance_Jep_with_matrix_factory()
                                                                                    throws JepException
        Throws:
        JepException
      • testMatrixFunctions_with_lightWeightInstance

        @Test
        public void testMatrixFunctions_with_lightWeightInstance()
                                                          throws JepException
        Throws:
        JepException