All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ejml.factory.QRPDecomposition Maven / Gradle / Ivy

Go to download

A fast and easy to use dense matrix linear algebra library written in Java.

There is a newer version: 0.25
Show newest version
/*
 * Copyright (c) 2009-2012, Peter Abeles. All Rights Reserved.
 *
 * This file is part of Efficient Java Matrix Library (EJML).
 *
 * EJML is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3
 * of the License, or (at your option) any later version.
 *
 * EJML is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with EJML.  If not, see .
 */

package org.ejml.factory;

import org.ejml.data.DenseMatrix64F;
import org.ejml.data.Matrix64F;

/**
 * 

* Similar to {@link QRDecomposition} but it can handle the rank deficient case by * performing column pivots during the decomposition. The final decomposition has the * following structure:
* A*P=Q*R
* where A is the original matrix, P is a pivot matrix, Q is an orthogonal matrix, and R is * upper triangular. *

* *

* WARNING: You should always call {@link #setSingularThreshold(double)} before {@link #decompose(org.ejml.data.Matrix64F)}. *

* * @author Peter Abeles */ public interface QRPDecomposition extends QRDecomposition { /** *

* Specifies the threshold used to flag a column as being singular. The optimal threshold (if one exists) * varies by the matrix being processed. A reasonable value would be the maximum absolute value of the * matrix's elements multiplied by EPS:
* decomposition.setSingularThreshold(CommonOps.elementMaxAbs(A)*UtilEjml.EPS) *

* * @param threshold Singular threshold. */ public void setSingularThreshold( double threshold ); /** * Returns the rank as determined by the algorithm. This is dependent upon a fixed threshold * and might not be appropriate for some applications. * * @return Matrix's rank */ public int getRank(); /** * Ordering of each column after pivoting. The current column i was original at column pivot[i]. * * @return Order of columns. */ public int[] getPivots(); /** * Creates the pivot matrix. * * @param P Optional storage for pivot matrix. If null a new matrix will be created. * @return The pivot matrix. */ public DenseMatrix64F getPivotMatrix( DenseMatrix64F P ); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy