Binomial_CrossEnthophy
fixed rowwise/colswise mean/sum and implemented binomial_corssentrhopy. Next up is regression.
This commit is contained in:
@@ -11,6 +11,11 @@ namespace numerics{
|
||||
inline void inplace_sub(utils::Matrix<T>& A, const T b) {
|
||||
detail::inplace_sub_scalar_serial(A,b);
|
||||
}
|
||||
template <typename T>
|
||||
inline void inplace_sub(const T b, utils::Matrix<T>& A) {
|
||||
detail::inplace_sub_scalar_serial(b,A);
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline utils::Matrix<T> sub(const utils::Matrix<T>& A, const T b) {
|
||||
@@ -18,11 +23,22 @@ namespace numerics{
|
||||
inplace_sub(out, b);
|
||||
return out;
|
||||
}
|
||||
template <typename T>
|
||||
inline utils::Matrix<T> sub(const T b, const utils::Matrix<T>& A) {
|
||||
utils::Matrix<T> out = A;
|
||||
inplace_sub(b, out);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline void inplace_sub(utils::Vector<T>& v, const T b) {
|
||||
detail::inplace_sub_scalar_serial(v,b);
|
||||
}
|
||||
template <typename T>
|
||||
inline void inplace_sub(const T b, utils::Vector<T>& v) {
|
||||
detail::inplace_sub_scalar_serial(b,v);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline utils::Vector<T> sub(const utils::Vector<T>& v, const T b) {
|
||||
@@ -30,6 +46,14 @@ namespace numerics{
|
||||
inplace_sub(out, b);
|
||||
return out;
|
||||
}
|
||||
template <typename T>
|
||||
inline utils::Vector<T> sub(const T b, const utils::Vector<T>& v) {
|
||||
utils::Vector<T> out = v;
|
||||
inplace_sub(b, out);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
// ---------------- Elementwise ----------------
|
||||
template <typename T>
|
||||
inline void inplace_sub(utils::Matrix<T>& A, const utils::Matrix<T>& B) {
|
||||
|
||||
Reference in New Issue
Block a user