Skip to content

Commit

Permalink
Reintroduced parameter D with a description and pointer to further li…
Browse files Browse the repository at this point in the history
…terature.
  • Loading branch information
thogerig committed Aug 15, 2019
1 parent 607a461 commit 6b446a8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/scala/scalismo/numerics/PivotedCholesky.scala
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,15 @@ object PivotedCholesky {

val PivotedCholesky(l, _, _) = computeApproximateCholeskyGeneric(k, xs, sc)

val Lt = l(::, 0 until l.cols).t
val phi: DenseMatrix[Double] = Lt * l(::, 0 until l.cols)
// Parameter D is called mass matrix in the 'Galerkin discretization' of the eigenvalue problem.
// Here it can be written as a scalar value.
// For more information in regards to situations where D might be adapted, please start with
// "On the Low-rank Approximation by the PivotedCholesky Decomposition" (H. Harbrecht, M. Peters, R. Schneider)

val D = 1.0

val LtD = l(::, 0 until l.cols).t * D
val phi: DenseMatrix[Double] = LtD * l(::, 0 until l.cols)

val SVD(v, _, _) = breeze.linalg.svd(phi)
val U: DenseMatrix[Double] = l(::, 0 until l.cols) * v
Expand Down

0 comments on commit 6b446a8

Please sign in to comment.