CopolarC.java

  1. /*
  2.  * Licensed to the Hipparchus project 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 Hipparchus project 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.  *      https://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.hipparchus.special.elliptic.jacobi;

  18. /** Copolar trio with pole at point c in Glaisher’s Notation.
  19.  * <p>
  20.  * This is a container for the three subsidiary Jacobi elliptic functions
  21.  * {@code dc(u|m)}, {@code nc(u|m)}, and {@code sc(u|m)}.
  22.  * </p>
  23.  * @since 2.0
  24.  */
  25. public class CopolarC {

  26.     /** Value of the dc function. */
  27.     private final double dc;

  28.     /** Value of the nc function. */
  29.     private final double nc;

  30.     /** Value of the sc function. */
  31.     private final double sc;

  32.     /** Simple constructor.
  33.      * @param trioN copolar trio with pole at point n in Glaisher’s Notation
  34.      */
  35.     CopolarC(final CopolarN trioN) {
  36.         this.nc = 1.0 / trioN.cn();
  37.         this.sc = nc  * trioN.sn();
  38.         this.dc = nc  * trioN.dn();
  39.     }

  40.     /** Get the value of the dc function.
  41.      * @return dc(u|m)
  42.      */
  43.     public double dc() {
  44.         return dc;
  45.     }

  46.     /** Get the value of the nc function.
  47.      * @return nc(u|m)
  48.      */
  49.     public double nc() {
  50.         return nc;
  51.     }

  52.     /** Get the value of the sc function.
  53.      * @return sc(u|m)
  54.      */
  55.     public double sc() {
  56.         return sc;
  57.     }

  58. }