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
18 package org.apache.commons.math4.legacy.ode.sampling;
19
20 /** Step normalizer output tests, for problems where the first and last points
21 * are not fixed points.
22 */
23 public class StepNormalizerOutputTest extends StepNormalizerOutputTestBase {
24 @Override
25 protected double getStart() {
26 return 0.3;
27 }
28
29 @Override
30 protected double getEnd() {
31 return 10.1;
32 }
33
34 @Override
35 protected double[] getExpInc() {
36 return new double[] { 0.3, 0.8, 1.3, 1.8, 2.3, 2.8, 3.3, 3.8, 4.3,
37 4.8, 5.3, 5.8, 6.3, 6.8, 7.3, 7.8, 8.3, 8.8,
38 9.3, 9.8, 10.1 };
39 }
40
41 @Override
42 protected double[] getExpIncRev() {
43 return new double[] { 10.1, 9.6, 9.1, 8.6, 8.1, 7.6, 7.1, 6.6,
44 6.1, 5.6, 5.1, 4.6, 4.1, 3.6, 3.1, 2.6,
45 2.1, 1.6, 1.1, 0.6, 0.3 };
46 }
47
48 @Override
49 protected double[] getExpMul() {
50 return new double[] { 0.3, 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, 10.1 };
53 }
54
55 @Override
56 protected double[] getExpMulRev() {
57 return new double[] { 10.1, 10.0, 9.5, 9.0, 8.5, 8.0, 7.5, 7.0,
58 6.5, 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.3 };
60 }
61
62 @Override
63 protected int[][] getO() {
64 return new int[][] {{1, 1}, {1, 1}, {0, 1}, {0, 1},
65 {1, 0}, {1, 0}, {0, 0}, {0, 0},
66 {1, 1}, {1, 1}, {0, 1}, {0, 1},
67 {1, 0}, {1, 0}, {0, 0}, {0, 0}};
68 }
69 }