View Javadoc
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  
18  package org.hipparchus.ode.sampling;
19  
20  /** Step normalizer output tests, for problems where the first and last points
21   * are overlap fixed points.
22   */
23  public class StepNormalizerOutputOverlapTest extends StepNormalizerOutputTestBase {
24      @Override
25      protected double getStart() {
26          return 0.0;
27      }
28  
29      @Override
30      protected double getEnd() {
31          return 10.0;
32      }
33  
34      @Override
35      protected double[] getExpInc() {
36          return new double[] { 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0,
37                                4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5,
38                                9.0, 9.5, 10.0 };
39      }
40  
41      @Override
42      protected double[] getExpIncRev() {
43          return new double[] { 10.0, 9.5, 9.0, 8.5, 8.0, 7.5, 7.0, 6.5,
44                                6.0, 5.5, 5.0, 4.5, 4.0, 3.5, 3.0, 2.5,
45                                2.0, 1.5, 1.0, 0.5, 0.0 };
46      }
47  
48      @Override
49      protected double[] getExpMul() {
50          return new double[] { 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0,
51                                4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5,
52                                9.0, 9.5, 10.0 };
53      }
54  
55      @Override
56      protected double[] getExpMulRev() {
57          return new double[] { 10.0, 9.5, 9.0, 8.5, 8.0, 7.5, 7.0, 6.5,
58                                6.0, 5.5, 5.0, 4.5, 4.0, 3.5, 3.0, 2.5,
59                                2.0, 1.5, 1.0, 0.5, 0.0 };
60      }
61  
62      @Override
63      protected int[][] getO() {
64          return new int[][] {{1, 0}, {1, 0}, {0, 0}, {0, 0},
65                              {1, 0}, {1, 0}, {0, 0}, {0, 0},
66                              {1, 0}, {1, 0}, {0, 0}, {0, 0},
67                              {1, 0}, {1, 0}, {0, 0}, {0, 0}};
68      }
69  }