//-------------------------------------------------------------------------
        public virtual void coverage()
        {
            JacobianCalibrationMatrix test = JacobianCalibrationMatrix.of(CPS, MATRIX);

            coverImmutableBean(test);
            JacobianCalibrationMatrix test2 = JacobianCalibrationMatrix.of(ImmutableList.of(CPS1), MATRIX2);

            coverBeanEquals(test, test2);
        }
        //-------------------------------------------------------------------------
        public virtual void test_split()
        {
            JacobianCalibrationMatrix test = JacobianCalibrationMatrix.of(CPS, MATRIX);
            DoubleArray array  = DoubleArray.of(1, 2, 3, 4, 5);
            DoubleArray array1 = DoubleArray.of(1, 2, 3);
            DoubleArray array2 = DoubleArray.of(4, 5);

            assertEquals(test.splitValues(array), ImmutableMap.of(NAME1, array1, NAME2, array2));
        }
        //-------------------------------------------------------------------------
        public virtual void test_of()
        {
            JacobianCalibrationMatrix test = JacobianCalibrationMatrix.of(CPS, MATRIX);

            assertEquals(test.Order, CPS);
            assertEquals(test.JacobianMatrix, MATRIX);
            assertEquals(test.CurveCount, 2);
            assertEquals(test.TotalParameterCount, 5);
            assertEquals(test.containsCurve(NAME1), true);
            assertEquals(test.containsCurve(NAME2), true);
            assertEquals(test.containsCurve(NAME3), false);
        }
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         JacobianCalibrationMatrix other = (JacobianCalibrationMatrix)obj;
         return(JodaBeanUtils.equal(order, other.order) && JodaBeanUtils.equal(jacobianMatrix, other.jacobianMatrix));
     }
     return(false);
 }
Пример #5
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Sets the calibration information.
 /// <para>
 /// This stores the calibration information in the additional information map
 /// using the key <seealso cref="CurveInfoType#JACOBIAN"/>.
 /// </para>
 /// <para>
 /// This is stored in the additional information map using {@code Map.put} semantics,
 /// removing the key if the jacobian is null.
 ///
 /// </para>
 /// </summary>
 /// <param name="jacobian">  the calibration information, may be null </param>
 /// <returns> this, for chaining </returns>
 public DefaultCurveMetadataBuilder jacobian(JacobianCalibrationMatrix jacobian)
 {
     return(addInfo(CurveInfoType.JACOBIAN, jacobian));
 }
        public virtual void test_serialization()
        {
            JacobianCalibrationMatrix test = JacobianCalibrationMatrix.of(CPS, MATRIX);

            assertSerialization(test);
        }