Skip to content

Commit

Permalink
Adding checks to ensure that the column rank is not trivially deficie…
Browse files Browse the repository at this point in the history
…nt in sparse LeastSquares/Ridge/Tikhonov
  • Loading branch information
Jack Poulson committed Nov 8, 2014
1 parent 05f63e8 commit 2cd9eb3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/sparse_direct/numeric/LeastSquares.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ void LeastSquares
if( orientation != NORMAL && A.Width() != Y.Height() )
LogicError("Width of A and height of Y must match");
)
if( A.Width() > A.Height() )
LogicError("LeastSquares currently assumes height(A) >= width(A)");
DistSparseMatrix<F> C(A.Comm());
if( orientation == NORMAL )
{
Expand Down
2 changes: 2 additions & 0 deletions src/sparse_direct/numeric/Ridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ void Ridge
if( A.Height() != Y.Height() )
LogicError("Heights of A and Y must match");
)
if( A.Width() > A.Height() )
LogicError("Ridge currently assumes height(A) >= width(A)");
const Int n = A.Width();
DistSparseMatrix<F> C(A.Comm());
Herk( LOWER, ADJOINT, Base<F>(1), A, C );
Expand Down
2 changes: 2 additions & 0 deletions src/sparse_direct/numeric/Tikhonov.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ void Tikhonov
if( A.Height() != Y.Height() )
LogicError("Heights of A and Y must match");
)
if( A.Width() > A.Height() )
LogicError("Tikhonov currently assumes height(A) >= width(A)");
const Int n = A.Width();
DistSparseMatrix<F> C(A.Comm());
Herk( LOWER, ADJOINT, Base<F>(1), A, C );
Expand Down
4 changes: 2 additions & 2 deletions vagrant/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This folder will slowly accumulate various [Vagrantfiles](http://vagrantup.com)
for developing Elemental. For instance, to load a 32-bit development environment
for Elemental within Ubuntu 13.10 (Saucy), simply run:
``cd saucy32; vagrant up``.
for Elemental within Ubuntu 14.04 (Trusty), simply run:
``cd trusty32; vagrant up``.

0 comments on commit 2cd9eb3

Please sign in to comment.