28 std::vector<X> m_data;
41 template<
typename Iterator>
42 matrix(
const std::vector<size_t> &
shape, Iterator first, Iterator last);
53 std::vector<size_t>
shape()
const;
54 std::vector<size_t>
strides(
bool bytes=
false)
const;
68 const X&
operator()(
size_t a,
size_t b,
size_t c,
size_t d)
const;
69 X&
operator()(
size_t a,
size_t b,
size_t c,
size_t d,
size_t e);
70 const X&
operator()(
size_t a,
size_t b,
size_t c,
size_t d,
size_t e)
const;
71 X&
operator()(
size_t a,
size_t b,
size_t c,
size_t d,
size_t e,
size_t f);
72 const X&
operator()(
size_t a,
size_t b,
size_t c,
size_t d,
size_t e,
size_t f)
const;
matrix< X > & operator*=(const matrix< X > &B)
const X & operator[](size_t i) const
size_t shape(size_t i) const
matrix(const std::vector< size_t > &shape, X D)
const X & operator()(size_t a, size_t b, size_t c, size_t d) const
matrix< X > & operator/=(const matrix< X > &B)
const X & operator()(size_t a, size_t b, size_t c, size_t d, size_t e, size_t f) const
X & operator()(size_t a, size_t b, size_t c, size_t d)
matrix< X > & operator+=(const matrix< X > &B)
const X & operator()(size_t a, size_t b, size_t c, size_t d, size_t e) const
const X & operator()(size_t a) const
void reshape(const std::vector< size_t > &shape)
matrix< X > & operator-=(const matrix< X > &B)
X & operator()(size_t a, size_t b, size_t c, size_t d, size_t e)
matrix(const std::vector< size_t > &shape, Iterator first, Iterator last)
matrix()
Definition: matrix.h:37
double average(const matrix< X > &weights) const
X & operator()(size_t a, size_t b, size_t c, size_t d, size_t e, size_t f)
X & operator()(size_t a, size_t b)
X & operator()(size_t a, size_t b, size_t c)
void resize(const std::vector< size_t > &shape)
std::vector< size_t > shape() const
std::vector< size_t > strides(bool bytes=false) const
const X & operator()(size_t a, size_t b, size_t c) const
matrix(const std::vector< size_t > &shape)
void printf(std::string fmt) const
const X & operator()(size_t a, size_t b) const
#define MAX_DIM
Definition: matrix.h:17
matrix< X > operator+(const matrix< X > &A, const matrix< X > &B)
matrix< X > operator-(const matrix< X > &A, const matrix< X > &B)
matrix< X > operator*(const matrix< X > &A, const matrix< X > &B)
matrix< X > operator/(const matrix< X > &A, const matrix< X > &B)