[mlpack-svn] r10712 - mlpack/trunk/src/mlpack/core/arma_extend
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Dec 12 04:32:32 EST 2011
Author: rcurtin
Date: 2011-12-12 04:32:31 -0500 (Mon, 12 Dec 2011)
New Revision: 10712
Modified:
mlpack/trunk/src/mlpack/core/arma_extend/fn_ccov.hpp
mlpack/trunk/src/mlpack/core/arma_extend/glue_ccov_meat.hpp
mlpack/trunk/src/mlpack/core/arma_extend/glue_ccov_proto.hpp
mlpack/trunk/src/mlpack/core/arma_extend/op_ccov_meat.hpp
mlpack/trunk/src/mlpack/core/arma_extend/op_ccov_proto.hpp
Log:
Convert u32 to uword for 2.4.0.
Modified: mlpack/trunk/src/mlpack/core/arma_extend/fn_ccov.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/arma_extend/fn_ccov.hpp 2011-12-12 09:26:12 UTC (rev 10711)
+++ mlpack/trunk/src/mlpack/core/arma_extend/fn_ccov.hpp 2011-12-12 09:32:31 UTC (rev 10712)
@@ -24,7 +24,7 @@
template<typename T1>
inline
const Op<T1, op_ccov>
-ccov(const Base<typename T1::elem_type,T1>& X, const u32 norm_type = 0)
+ccov(const Base<typename T1::elem_type,T1>& X, const uword norm_type = 0)
{
arma_extra_debug_sigprint();
@@ -38,7 +38,7 @@
template<typename T1, typename T2>
inline
const Glue<T1,T2,glue_ccov>
-cov(const Base<typename T1::elem_type, T1>& A, const Base<typename T1::elem_type,T2>& B, const u32 norm_type = 0)
+cov(const Base<typename T1::elem_type, T1>& A, const Base<typename T1::elem_type,T2>& B, const uword norm_type = 0)
{
arma_extra_debug_sigprint();
Modified: mlpack/trunk/src/mlpack/core/arma_extend/glue_ccov_meat.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/arma_extend/glue_ccov_meat.hpp 2011-12-12 09:26:12 UTC (rev 10711)
+++ mlpack/trunk/src/mlpack/core/arma_extend/glue_ccov_meat.hpp 2011-12-12 09:32:31 UTC (rev 10712)
@@ -24,7 +24,7 @@
template<typename eT>
inline
void
-glue_ccov::direct_ccov(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, const u32 norm_type)
+glue_ccov::direct_ccov(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, const uword norm_type)
{
arma_extra_debug_sigprint();
@@ -39,9 +39,9 @@
eT B_acc = eT(0);
eT out_acc = eT(0);
- const u32 N = A.n_elem;
+ const uword N = A.n_elem;
- for(u32 i=0; i<N; ++i)
+ for(uword i=0; i<N; ++i)
{
const eT A_tmp = A_ptr[i];
const eT B_tmp = B_ptr[i];
@@ -63,7 +63,7 @@
{
arma_debug_assert_same_size(A, B, "ccov()");
- const u32 N = A.n_cols;
+ const uword N = A.n_cols;
const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N);
out = A * trans(B);
@@ -77,7 +77,7 @@
template<typename T>
inline
void
-glue_ccov::direct_ccov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat< std::complex<T> >& B, const u32 norm_type)
+glue_ccov::direct_ccov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat< std::complex<T> >& B, const uword norm_type)
{
arma_extra_debug_sigprint();
@@ -94,9 +94,9 @@
eT B_acc = eT(0);
eT out_acc = eT(0);
- const u32 N = A.n_elem;
+ const uword N = A.n_elem;
- for(u32 i=0; i<N; ++i)
+ for(uword i=0; i<N; ++i)
{
const eT A_tmp = A_ptr[i];
const eT B_tmp = B_ptr[i];
@@ -118,7 +118,7 @@
{
arma_debug_assert_same_size(A, B, "ccov()");
- const u32 N = A.n_cols;
+ const uword N = A.n_cols;
const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N);
out = A * trans(conj(B));
@@ -144,7 +144,7 @@
const Mat<eT>& A = A_tmp.M;
const Mat<eT>& B = B_tmp.M;
- const u32 norm_type = X.aux_u32;
+ const uword norm_type = X.aux_uword;
if(&A != &B)
{
Modified: mlpack/trunk/src/mlpack/core/arma_extend/glue_ccov_proto.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/arma_extend/glue_ccov_proto.hpp 2011-12-12 09:26:12 UTC (rev 10711)
+++ mlpack/trunk/src/mlpack/core/arma_extend/glue_ccov_proto.hpp 2011-12-12 09:32:31 UTC (rev 10712)
@@ -24,8 +24,8 @@
{
public:
- template<typename eT> inline static void direct_ccov(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, const u32 norm_type);
- template<typename T> inline static void direct_ccov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat< std::complex<T> >& B, const u32 norm_type);
+ template<typename eT> inline static void direct_ccov(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, const uword norm_type);
+ template<typename T> inline static void direct_ccov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat< std::complex<T> >& B, const uword norm_type);
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2, glue_ccov>& X);
};
Modified: mlpack/trunk/src/mlpack/core/arma_extend/op_ccov_meat.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/arma_extend/op_ccov_meat.hpp 2011-12-12 09:26:12 UTC (rev 10711)
+++ mlpack/trunk/src/mlpack/core/arma_extend/op_ccov_meat.hpp 2011-12-12 09:32:31 UTC (rev 10712)
@@ -24,7 +24,7 @@
template<typename eT>
inline
void
-op_ccov::direct_ccov(Mat<eT>& out, const Mat<eT>& A, const u32 norm_type)
+op_ccov::direct_ccov(Mat<eT>& out, const Mat<eT>& A, const uword norm_type)
{
arma_extra_debug_sigprint();
@@ -41,7 +41,7 @@
}
else
{
- const u32 N = A.n_cols;
+ const uword N = A.n_cols;
const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N);
const Col<eT> acc = sum(A, 1);
@@ -57,7 +57,7 @@
template<typename T>
inline
void
-op_ccov::direct_ccov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const u32 norm_type)
+op_ccov::direct_ccov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const uword norm_type)
{
arma_extra_debug_sigprint();
@@ -80,7 +80,7 @@
}
else
{
- const u32 N = A.n_cols;
+ const uword N = A.n_cols;
const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N);
const Col<eT> acc = sum(A, 1);
@@ -105,7 +105,7 @@
const unwrap_check<T1> tmp(in.m, out);
const Mat<eT>& A = tmp.M;
- const u32 norm_type = in.aux_u32_a;
+ const uword norm_type = in.aux_uword_a;
op_ccov::direct_ccov(out, A, norm_type);
}
Modified: mlpack/trunk/src/mlpack/core/arma_extend/op_ccov_proto.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/arma_extend/op_ccov_proto.hpp 2011-12-12 09:26:12 UTC (rev 10711)
+++ mlpack/trunk/src/mlpack/core/arma_extend/op_ccov_proto.hpp 2011-12-12 09:32:31 UTC (rev 10712)
@@ -25,8 +25,8 @@
{
public:
- template<typename eT> inline static void direct_ccov(Mat<eT>& out, const Mat<eT>& X, const u32 norm_type);
- template<typename T> inline static void direct_ccov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& X, const u32 norm_type);
+ template<typename eT> inline static void direct_ccov(Mat<eT>& out, const Mat<eT>& X, const uword norm_type);
+ template<typename T> inline static void direct_ccov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& X, const uword norm_type);
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_ccov>& in);
};
More information about the mlpack-svn
mailing list