1 /* Copyright 2002-2025 CS GROUP 2 * Licensed to CS GROUP (CS) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * CS 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 package org.orekit.files.ccsds.ndm.odm.ocm; 18 19 /** Container for covariance matrix elements indices. 20 * @author Luc Maisonobe 21 * @since 11.0 22 */ 23 class CovarianceIndexer { 24 25 /** Matrix dimension. */ 26 private final int dimension; 27 28 /** Row index. */ 29 private int row; 30 31 /** Column index. */ 32 private int column; 33 34 /** Flag for cross-correlation trems. */ 35 private boolean crossCorrelation; 36 37 /** Build an indexer pointing at first row first column,. 38 * @param dimension matrix dimension 39 */ 40 CovarianceIndexer(final int dimension) { 41 this.dimension = dimension; 42 this.row = 0; 43 this.column = 0; 44 this.crossCorrelation = false; 45 } 46 47 /** Get matrix dimension. 48 * @return matrix dimension 49 */ 50 public int getDimension() { 51 return dimension; 52 } 53 54 /** Get row index. 55 * @return row index 56 */ 57 public int getRow() { 58 return row; 59 } 60 61 /** Set row index. 62 * @param row row index 63 */ 64 public void setRow(final int row) { 65 this.row = row; 66 } 67 68 /** Get column index. 69 * @return column index 70 */ 71 public int getColumn() { 72 return column; 73 } 74 75 /** Set column index. 76 * @param column column index 77 */ 78 public void setColumn(final int column) { 79 this.column = column; 80 } 81 82 /** Set cross-correlation flag. 83 * @param crossCorrelation if true, element is a cross-correlation term 84 */ 85 public void setCrossCorrelation(final boolean crossCorrelation) { 86 this.crossCorrelation = crossCorrelation; 87 } 88 89 /** Check if element is a cross-correlation term. 90 * @return true if element is a cross-correlation term 91 */ 92 public boolean isCrossCorrelation() { 93 return crossCorrelation; 94 } 95 96 }