Binomial_CrossEnthophy
fixed rowwise/colswise mean/sum and implemented binomial_corssentrhopy. Next up is regression.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#include "core/omp_config.h"
|
||||
#include "detail/binary_threshold_serial.h"
|
||||
|
||||
|
||||
namespace numerics{
|
||||
|
||||
// ---------------- Elementwise ----------------
|
||||
template <typename T>
|
||||
inline void inplace_greater_than(T& a, const T c) {
|
||||
detail::inplace_greater_than_serial(a, c);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T greater_than(const T a, const T c) {
|
||||
T out = a;
|
||||
inplace_greater_than(out, c);
|
||||
return out;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void inplace_greater_than(utils::Vector<T>& v, const T c) {
|
||||
detail::inplace_greater_than_serial(v, c);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline utils::Vector<T> greater_than(const utils::Vector<T>& v, const T c) {
|
||||
utils::Vector<T> out = v;
|
||||
inplace_greater_than(out, c);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline void inplace_greater_than(utils::Matrix<T>& A, const T c) {
|
||||
detail::inplace_greater_than_serial(A, c);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline utils::Matrix<T> greater_than(const utils::Matrix<T>& A, const T c) {
|
||||
utils::Matrix<T> out = A;
|
||||
inplace_greater_than(out, c);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user