View Javadoc
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    *      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  
18  /*
19   * This is not the original file distributed by the Apache Software Foundation
20   * It has been modified by the Hipparchus project
21   */
22  
23  package org.hipparchus.ode.sampling;
24  
25  /** Step normalizer output tests, for problems where the first and last points
26   * are not fixed points.
27   */
28  public class StepNormalizerOutputTest extends StepNormalizerOutputTestBase {
29      @Override
30      protected double getStart() {
31          return 0.3;
32      }
33  
34      @Override
35      protected double getEnd() {
36          return 10.1;
37      }
38  
39      @Override
40      protected double[] getExpInc() {
41          return new double[] { 0.3, 0.8, 1.3, 1.8, 2.3, 2.8, 3.3, 3.8, 4.3,
42                                4.8, 5.3, 5.8, 6.3, 6.8, 7.3, 7.8, 8.3, 8.8,
43                                9.3, 9.8, 10.1 };
44      }
45  
46      @Override
47      protected double[] getExpIncRev() {
48          return new double[] { 10.1, 9.6, 9.1, 8.6, 8.1, 7.6, 7.1, 6.6,
49                                6.1, 5.6, 5.1, 4.6, 4.1, 3.6, 3.1, 2.6,
50                                2.1, 1.6, 1.1, 0.6, 0.3 };
51      }
52  
53      @Override
54      protected double[] getExpMul() {
55          return new double[] { 0.3, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0,
56                                4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5,
57                                9.0, 9.5, 10.0, 10.1 };
58      }
59  
60      @Override
61      protected double[] getExpMulRev() {
62          return new double[] { 10.1, 10.0, 9.5, 9.0, 8.5, 8.0, 7.5, 7.0,
63                                6.5, 6.0, 5.5, 5.0, 4.5, 4.0, 3.5, 3.0, 2.5,
64                                2.0, 1.5, 1.0, 0.5, 0.3 };
65      }
66  
67      @Override
68      protected int[][] getO() {
69          return new int[][] {{1, 1}, {1, 1}, {0, 1}, {0, 1},
70                              {1, 0}, {1, 0}, {0, 0}, {0, 0},
71                              {1, 1}, {1, 1}, {0, 1}, {0, 1},
72                              {1, 0}, {1, 0}, {0, 0}, {0, 0}};
73      }
74  }