ParameterConfiguration.java

  1. /*
  2.  * Licensed to the Apache Software Foundation (ASF) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * The ASF licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *      http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.apache.commons.math4.legacy.ode;

  18. import java.io.Serializable;

  19. /** Simple container pairing a parameter name with a step in order to compute
  20.  *  the associated Jacobian matrix by finite difference.
  21.  *
  22.  * @since 3.0
  23.  */
  24. class ParameterConfiguration implements Serializable {

  25.     /** Serializable UID. */
  26.     private static final long serialVersionUID = 2247518849090889379L;

  27.     /** Parameter name. */
  28.     private String parameterName;

  29.     /** Parameter step for finite difference computation. */
  30.     private double hP;

  31.     /** Parameter name and step pair constructor.
  32.      * @param parameterName parameter name
  33.      * @param hP parameter step
  34.      */
  35.     ParameterConfiguration(final String parameterName, final double hP) {
  36.         this.parameterName = parameterName;
  37.         this.hP = hP;
  38.     }

  39.     /** Get parameter name.
  40.      * @return parameterName parameter name
  41.      */
  42.     public String getParameterName() {
  43.         return parameterName;
  44.     }

  45.     /** Get parameter step.
  46.      * @return hP parameter step
  47.      */
  48.     public double getHP() {
  49.         return hP;
  50.     }

  51.     /** Set parameter step.
  52.      * @param hParam parameter step
  53.      */
  54.     public void setHP(final double hParam) {
  55.         this.hP = hParam;
  56.     }
  57. }