From 2a6fc2acee2e878f425bc5944235b1380688cdc7 Mon Sep 17 00:00:00 2001 From: romgerale Date: Tue, 7 Nov 2017 23:57:17 -0200 Subject: [PATCH] Riccati Equation Solver II Fixing the headers. --- .../java/org/hipparchus/complex/ComplexComparator.java | 4 ++-- .../org/hipparchus/linear/ComplexEigenDecomposition.java | 9 +++++---- .../linear/OrderedComplexEigenDecomposition.java | 4 ++-- .../org/hipparchus/linear/OrderedEigenDecomposition.java | 4 ++-- .../org/hipparchus/linear/RiccatiEquationSolver.java | 4 ++-- .../org/hipparchus/linear/RiccatiEquationSolverImpl.java | 4 ++-- .../org/hipparchus/complex/ComplexComparatorTest.java | 4 ++-- .../hipparchus/linear/ComplexEigenDecompositionTest.java | 4 ++-- .../linear/OrderedComplexEigenDecompositionTest.java | 4 ++-- .../hipparchus/linear/OrderedEigenDecompositionTest.java | 4 ++-- .../org/hipparchus/linear/RiccatiEquationSolverTest.java | 4 ++-- 11 files changed, 25 insertions(+), 24 deletions(-) diff --git a/hipparchus-core/src/main/java/org/hipparchus/complex/ComplexComparator.java b/hipparchus-core/src/main/java/org/hipparchus/complex/ComplexComparator.java index 28008a4368..c42219d183 100644 --- a/hipparchus-core/src/main/java/org/hipparchus/complex/ComplexComparator.java +++ b/hipparchus-core/src/main/java/org/hipparchus/complex/ComplexComparator.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * diff --git a/hipparchus-core/src/main/java/org/hipparchus/linear/ComplexEigenDecomposition.java b/hipparchus-core/src/main/java/org/hipparchus/linear/ComplexEigenDecomposition.java index 4de2ad0994..6f37eb7226 100644 --- a/hipparchus-core/src/main/java/org/hipparchus/linear/ComplexEigenDecomposition.java +++ b/hipparchus-core/src/main/java/org/hipparchus/linear/ComplexEigenDecomposition.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * @@ -44,9 +44,10 @@ public class ComplexEigenDecomposition { /** Internally used epsilon criteria. */ private static final double EPSILON = 1e-12; + /** Internally used epsilon criteria for equals. */ + private static final double EPSILON_EQUALS = 1e-6; /** complex eigenvalues. */ private Complex[] eigenvalues; - /** Eigenvectors. */ private ArrayFieldVector[] eigenvectors; /** Cached value of V. */ @@ -281,7 +282,7 @@ protected void checkDefinition(final RealMatrix matrix) { // testing A*V = V*D FieldMatrix AV = matrixC.multiply(getV()); FieldMatrix VD = getV().multiply(getD()); - if (!equalsWithPrecision(AV, VD, EPSILON)) { + if (!equalsWithPrecision(AV, VD, EPSILON_EQUALS)) { throw new MathRuntimeException(LocalizedCoreFormats.CONSTRAINT, "Erro checking definition " + matrixC.multiply(getV()).toString() + " " diff --git a/hipparchus-core/src/main/java/org/hipparchus/linear/OrderedComplexEigenDecomposition.java b/hipparchus-core/src/main/java/org/hipparchus/linear/OrderedComplexEigenDecomposition.java index 6e3dadb21a..e439f133e6 100644 --- a/hipparchus-core/src/main/java/org/hipparchus/linear/OrderedComplexEigenDecomposition.java +++ b/hipparchus-core/src/main/java/org/hipparchus/linear/OrderedComplexEigenDecomposition.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * diff --git a/hipparchus-core/src/main/java/org/hipparchus/linear/OrderedEigenDecomposition.java b/hipparchus-core/src/main/java/org/hipparchus/linear/OrderedEigenDecomposition.java index 8325b00193..8135e2606d 100644 --- a/hipparchus-core/src/main/java/org/hipparchus/linear/OrderedEigenDecomposition.java +++ b/hipparchus-core/src/main/java/org/hipparchus/linear/OrderedEigenDecomposition.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * diff --git a/hipparchus-core/src/main/java/org/hipparchus/linear/RiccatiEquationSolver.java b/hipparchus-core/src/main/java/org/hipparchus/linear/RiccatiEquationSolver.java index 044eb19168..8ab654f3ff 100644 --- a/hipparchus-core/src/main/java/org/hipparchus/linear/RiccatiEquationSolver.java +++ b/hipparchus-core/src/main/java/org/hipparchus/linear/RiccatiEquationSolver.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * diff --git a/hipparchus-core/src/main/java/org/hipparchus/linear/RiccatiEquationSolverImpl.java b/hipparchus-core/src/main/java/org/hipparchus/linear/RiccatiEquationSolverImpl.java index f4ae9a36d6..d52f997f81 100644 --- a/hipparchus-core/src/main/java/org/hipparchus/linear/RiccatiEquationSolverImpl.java +++ b/hipparchus-core/src/main/java/org/hipparchus/linear/RiccatiEquationSolverImpl.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * diff --git a/hipparchus-core/src/test/java/org/hipparchus/complex/ComplexComparatorTest.java b/hipparchus-core/src/test/java/org/hipparchus/complex/ComplexComparatorTest.java index cfcfa52431..0c4c6d8ff7 100644 --- a/hipparchus-core/src/test/java/org/hipparchus/complex/ComplexComparatorTest.java +++ b/hipparchus-core/src/test/java/org/hipparchus/complex/ComplexComparatorTest.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * diff --git a/hipparchus-core/src/test/java/org/hipparchus/linear/ComplexEigenDecompositionTest.java b/hipparchus-core/src/test/java/org/hipparchus/linear/ComplexEigenDecompositionTest.java index 049a662cb4..1c0031e921 100644 --- a/hipparchus-core/src/test/java/org/hipparchus/linear/ComplexEigenDecompositionTest.java +++ b/hipparchus-core/src/test/java/org/hipparchus/linear/ComplexEigenDecompositionTest.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * diff --git a/hipparchus-core/src/test/java/org/hipparchus/linear/OrderedComplexEigenDecompositionTest.java b/hipparchus-core/src/test/java/org/hipparchus/linear/OrderedComplexEigenDecompositionTest.java index be4bfd8d1c..16d72dac25 100644 --- a/hipparchus-core/src/test/java/org/hipparchus/linear/OrderedComplexEigenDecompositionTest.java +++ b/hipparchus-core/src/test/java/org/hipparchus/linear/OrderedComplexEigenDecompositionTest.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * diff --git a/hipparchus-core/src/test/java/org/hipparchus/linear/OrderedEigenDecompositionTest.java b/hipparchus-core/src/test/java/org/hipparchus/linear/OrderedEigenDecompositionTest.java index 51aefbac07..e4e77b5a36 100644 --- a/hipparchus-core/src/test/java/org/hipparchus/linear/OrderedEigenDecompositionTest.java +++ b/hipparchus-core/src/test/java/org/hipparchus/linear/OrderedEigenDecompositionTest.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * diff --git a/hipparchus-core/src/test/java/org/hipparchus/linear/RiccatiEquationSolverTest.java b/hipparchus-core/src/test/java/org/hipparchus/linear/RiccatiEquationSolverTest.java index 29e7d9b2b1..f98aeb7073 100644 --- a/hipparchus-core/src/test/java/org/hipparchus/linear/RiccatiEquationSolverTest.java +++ b/hipparchus-core/src/test/java/org/hipparchus/linear/RiccatiEquationSolverTest.java @@ -1,8 +1,8 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more + * Licensed to the Hipparchus project under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 + * The Hipparchus project licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at *