[mlpack] 176/324: Simple style changes for consistency.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit 7c35ec2c7fe982e1716b48cfb96724ff8ba503b1
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Fri Jul 11 19:41:47 2014 +0000

    Simple style changes for consistency.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16815 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/methods/quic_svd/quic_svd.hpp      |  6 +++---
 src/mlpack/methods/quic_svd/quic_svd_impl.hpp | 14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/mlpack/methods/quic_svd/quic_svd.hpp b/src/mlpack/methods/quic_svd/quic_svd.hpp
index f2ef741..afc4ca3 100644
--- a/src/mlpack/methods/quic_svd/quic_svd.hpp
+++ b/src/mlpack/methods/quic_svd/quic_svd.hpp
@@ -16,7 +16,7 @@ namespace svd {
 class QUIC_SVD
 {
  public:
- 
+
   /**
    * Constructor which implements the QUIC-SVD algorithm. The function calls the
    * CosineTree constructor to create a subspace basis, where the original
@@ -37,7 +37,7 @@ class QUIC_SVD
            arma::mat& sigma,
            const double epsilon = 0.03,
            const double delta = 0.1);
-  
+
   /**
    * This function uses the vector subspace created using a cosine tree to
    * calculate an approximate SVD of the original matrix.
@@ -49,7 +49,7 @@ class QUIC_SVD
   void ExtractSVD(arma::mat& u,
                   arma::mat& v,
                   arma::mat& sigma);
-  
+
  private:
   //! Matrix for which cosine tree is constructed.
   const arma::mat& dataset;
diff --git a/src/mlpack/methods/quic_svd/quic_svd_impl.hpp b/src/mlpack/methods/quic_svd/quic_svd_impl.hpp
index f1fada3..a5dba39 100644
--- a/src/mlpack/methods/quic_svd/quic_svd_impl.hpp
+++ b/src/mlpack/methods/quic_svd/quic_svd_impl.hpp
@@ -28,14 +28,14 @@ QUIC_SVD::QUIC_SVD(const arma::mat& dataset,
   // Since columns are sample in the implementation, the matrix is transposed if
   // necessary for maximum speedup.
   CosineTree* ctree;
-  if(dataset.n_cols > dataset.n_rows)
+  if (dataset.n_cols > dataset.n_rows)
     ctree = new CosineTree(dataset, epsilon, delta);
   else
     ctree = new CosineTree(dataset.t(), epsilon, delta);
-    
+
   // Get subspace basis by creating the cosine tree.
   ctree->GetFinalBasis(basis);
-  
+
   // Use the ExtractSVD algorithm mentioned in the paper to extract the SVD of
   // the original dataset in the obtained subspace.
   ExtractSVD(u, v, sigma);
@@ -47,11 +47,11 @@ void QUIC_SVD::ExtractSVD(arma::mat& u,
 {
   // Calculate A * V_hat, necessary for further calculations.
   arma::mat projectedMat;
-  if(dataset.n_cols > dataset.n_rows)
+  if (dataset.n_cols > dataset.n_rows)
     projectedMat = dataset.t() * basis;
   else
     projectedMat = dataset * basis;
-  
+
   // Calculate the squared projected matrix.
   arma::mat projectedMatSquared = projectedMat.t() * projectedMat;
 
@@ -65,10 +65,10 @@ void QUIC_SVD::ExtractSVD(arma::mat& u,
   v = basis * vBar;
   sigma = arma::sqrt(diagmat(sigmaBar));
   u = projectedMat * vBar * sigma.i();
-  
+
   // Since columns are sampled, the unitary matrices have to be exchanged, if
   // the transposed matrix is not passed.
-  if(dataset.n_cols > dataset.n_rows)
+  if (dataset.n_cols > dataset.n_rows)
   {
     arma::mat tempMat = u;
     u = v;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list