arma_version.hpp | arma_version.hpp | |||
---|---|---|---|---|
skipping to change at line 18 | skipping to change at line 18 | |||
// Lesser General Public License (LGPL) as published | // Lesser General Public License (LGPL) as published | |||
// by the Free Software Foundation, either version 3 | // by the Free Software Foundation, either version 3 | |||
// of the License or (at your option) any later version. | // of the License or (at your option) any later version. | |||
// (see http://www.opensource.org/licenses for more info) | // (see http://www.opensource.org/licenses for more info) | |||
//! \addtogroup arma_version | //! \addtogroup arma_version | |||
//! @{ | //! @{ | |||
#define ARMA_VERSION_MAJOR 2 | #define ARMA_VERSION_MAJOR 2 | |||
#define ARMA_VERSION_MINOR 2 | #define ARMA_VERSION_MINOR 2 | |||
#define ARMA_VERSION_PATCH 0 | #define ARMA_VERSION_PATCH 1 | |||
#define ARMA_VERSION_NAME "Blue Skies Debauchery" | #define ARMA_VERSION_NAME "Blue Skies Debauchery" | |||
struct arma_version | struct arma_version | |||
{ | { | |||
static const unsigned int major = ARMA_VERSION_MAJOR; | static const unsigned int major = ARMA_VERSION_MAJOR; | |||
static const unsigned int minor = ARMA_VERSION_MINOR; | static const unsigned int minor = ARMA_VERSION_MINOR; | |||
static const unsigned int patch = ARMA_VERSION_PATCH; | static const unsigned int patch = ARMA_VERSION_PATCH; | |||
static | static | |||
inline | inline | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
glue_cor_meat.hpp | glue_cor_meat.hpp | |||
---|---|---|---|---|
skipping to change at line 138 | skipping to change at line 138 | |||
out /= conv_to< Mat<eT> >::from( stddev_A * stddev_B ); | out /= conv_to< Mat<eT> >::from( stddev_A * stddev_B ); | |||
} | } | |||
else | else | |||
{ | { | |||
arma_debug_assert_same_size(A, B, "cor()"); | arma_debug_assert_same_size(A, B, "cor()"); | |||
const u32 N = A.n_rows; | const u32 N = A.n_rows; | |||
const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); | const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); | |||
out = trans(conj(A)) * B; | out = trans(A) * B; // out = strans(conj(A)) * B; | |||
out -= (trans(conj(sum(A))) * sum(B))/eT(N); | out -= (trans(sum(A)) * sum(B))/eT(N); // out -= (strans(conj(sum(A))) | |||
* sum(B))/eT(N); | ||||
out /= norm_val; | out /= norm_val; | |||
out /= conv_to< Mat<eT> >::from( trans(stddev(A)) * stddev(B) ); | out /= conv_to< Mat<eT> >::from( trans(stddev(A)) * stddev(B) ); | |||
} | } | |||
} | } | |||
template<typename T1, typename T2> | template<typename T1, typename T2> | |||
inline | inline | |||
void | void | |||
glue_cor::apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_cor >& X) | glue_cor::apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_cor >& X) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added | |||
op_cor_meat.hpp | op_cor_meat.hpp | |||
---|---|---|---|---|
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) | // Copyright (C) 2009-2011 NICTA (www.nicta.com.au) | |||
// Copyright (C) 2009-2010 Conrad Sanderson | // Copyright (C) 2009-2011 Conrad Sanderson | |||
// Copyright (C) 2009-2010 Dimitrios Bouzas | // Copyright (C) 2009-2010 Dimitrios Bouzas | |||
// | // | |||
// This file is part of the Armadillo C++ library. | // This file is part of the Armadillo C++ library. | |||
// It is provided without any warranty of fitness | // It is provided without any warranty of fitness | |||
// for any purpose. You can redistribute this file | // for any purpose. You can redistribute this file | |||
// and/or modify it under the terms of the GNU | // and/or modify it under the terms of the GNU | |||
// Lesser General Public License (LGPL) as published | // Lesser General Public License (LGPL) as published | |||
// by the Free Software Foundation, either version 3 | // by the Free Software Foundation, either version 3 | |||
// of the License or (at your option) any later version. | // of the License or (at your option) any later version. | |||
// (see http://www.opensource.org/licenses for more info) | // (see http://www.opensource.org/licenses for more info) | |||
skipping to change at line 78 | skipping to change at line 78 | |||
out[0] = eT(1); | out[0] = eT(1); | |||
} | } | |||
else | else | |||
{ | { | |||
const u32 N = A.n_rows; | const u32 N = A.n_rows; | |||
const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); | const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); | |||
const Row<eT> acc = sum(A); | const Row<eT> acc = sum(A); | |||
const Row<T> sd = stddev(A); | const Row<T> sd = stddev(A); | |||
out = trans(conj(A)) * A; | out = trans(A) * A; // out = strans(conj(A)) * A; | |||
out -= (trans(conj(acc)) * acc)/eT(N); | out -= (trans(acc) * acc)/eT(N); // out -= (strans(conj(acc)) * acc)/e | |||
T(N); | ||||
out /= norm_val; | out /= norm_val; | |||
//out = out / (trans(sd) * sd); | //out = out / (trans(sd) * sd); | |||
out /= conv_to< Mat<eT> >::from(trans(sd) * sd); | out /= conv_to< Mat<eT> >::from(trans(sd) * sd); | |||
} | } | |||
} | } | |||
template<typename T1> | template<typename T1> | |||
inline | inline | |||
void | void | |||
End of changes. 2 change blocks. | ||||
4 lines changed or deleted | 5 lines changed or added | |||