Skip to content
This repository has been archived by the owner on Dec 22, 2018. It is now read-only.

Commit

Permalink
rename corr in CorrelationMatrix to c
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlawlor committed Feb 2, 2015
1 parent 86a6b68 commit 748510c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions covariancematrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@ func CovarianceMatrix(cov *mat64.Dense, x mat64.Matrix, wts []float64) *mat64.De
// and positive-semidefinite.
//
// The weights wts should have the length equal to the number of rows in
// input data matrix x. cov should either be a square matrix with the same
// input data matrix x. c should either be a square matrix with the same
// number of columns as the input data matrix x, or nil in which case a new
// Dense matrix will be constructed. Weights cannot be negative.
func CorrelationMatrix(corr *mat64.Dense, x mat64.Matrix, wts []float64) *mat64.Dense {
func CorrelationMatrix(c *mat64.Dense, x mat64.Matrix, wts []float64) *mat64.Dense {

// TODO(jonlawlor): indicate that the resulting matrix is symmetric, and change
// the returned type from a *mat.Dense to a *mat.Symmetric.

// This will panic if the sizes don't match, or if wts is the wrong size.
corr = CovarianceMatrix(corr, x, wts)
covToCorr(corr)
return corr
c = CovarianceMatrix(c, x, wts)
covToCorr(c)
return c
}

// covToCorr converts a covariance matrix to a correlation matrix.
Expand Down

0 comments on commit 748510c

Please sign in to comment.