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  package org.hipparchus.migration.linear;
23  
24  import org.hipparchus.exception.MathIllegalArgumentException;
25  
26  /**
27   * Exception to be thrown when a symmetric matrix is expected.
28   *
29   * @deprecated as of 1.0, this exception is replaced by {@link MathIllegalArgumentException}
30   */
31  @Deprecated
32  public class NonSymmetricMatrixException extends MathIllegalArgumentException {
33      /** Serializable version Id. */
34      private static final long serialVersionUID = -7518495577824189882L;
35      /** Row. */
36      private final int row;
37      /** Column. */
38      private final int column;
39      /** Threshold. */
40      private final double threshold;
41  
42      /**
43       * Construct an exception.
44       *
45       * @param row Row index.
46       * @param column Column index.
47       * @param threshold Relative symmetry threshold.
48       */
49      public NonSymmetricMatrixException(int row,
50                                         int column,
51                                         double threshold) {
52          super(org.hipparchus.migration.exception.util.LocalizedFormats.NON_SYMMETRIC_MATRIX, row, column, threshold);
53          this.row = row;
54          this.column = column;
55          this.threshold = threshold;
56      }
57  
58      /** Get row index of the entry.
59       * @return the row index of the entry
60       */
61      public int getRow() {
62          return row;
63      }
64  
65      /** Get column index of the entry.
66       * @return the column index of the entry
67       */
68      public int getColumn() {
69          return column;
70      }
71  
72      /** Get relative symmetry threshold.
73       * @return the relative symmetry threshold
74       */
75      public double getThreshold() {
76          return threshold;
77      }
78  
79  }