/* Copyright (c) 2009-2014, Jack Poulson All rights reserved. This file is part of Elemental and is under the BSD 2-Clause License, which can be found in the LICENSE file in the root directory, or at http://opensource.org/licenses/BSD-2-Clause */ #pragma once #ifndef ELEM_HAAR_HPP #define ELEM_HAAR_HPP #include ELEM_QR_INC #include ELEM_GAUSSIAN_INC namespace elem { template inline void Haar( Matrix& A, Int n ) { DEBUG_ONLY(CallStackEntry cse("Haar")) // TODO: Replace this with a quadratic scheme similar to Stewart's, which // essentially generates random Householder reflectors Gaussian( A, n, n ); qr::Explicit( A ); } template inline void ImplicitHaar( Matrix& A, Matrix& t, Matrix>& d, Int n ) { DEBUG_ONLY(CallStackEntry cse("ImplicitHaar")) // TODO: Replace this with a quadratic scheme similar to Stewart's, which // essentially generates random Householder reflectors Gaussian( A, n, n ); QR( A, t, d ); } template inline void Haar( DistMatrix& A, Int n ) { DEBUG_ONLY(CallStackEntry cse("Haar")) // TODO: Replace this with a quadratic scheme similar to Stewart's, which // essentially generates random Householder reflectors Gaussian( A, n, n ); qr::Explicit( A ); } template inline void ImplicitHaar ( DistMatrix& A, DistMatrix& t, DistMatrix,MD,STAR>& d, Int n ) { DEBUG_ONLY(CallStackEntry cse("Haar")) // TODO: Replace this with a quadratic scheme similar to Stewart's, which // essentially generates random Householder reflectors Gaussian( A, n, n ); QR( A, t, d ); } } // namespace elem #endif // ifndef ELEM_HAAR_HPP