16 template<
typename Type,
size_t M,
size_t N>
19 template<
typename Type,
size_t M>
22 template <
typename Type,
size_t P,
size_t Q,
size_t M,
size_t N>
29 static_assert(
P <= M,
"Slice rows bigger than backing matrix");
30 static_assert(Q <= N,
"Slice cols bigger than backing matrix");
43 template<
size_t MM,
size_t NN>
47 for (
size_t i = 0; i <
P; i++) {
48 for (
size_t j = 0; j < Q; j++) {
49 self(i, j) = other(i, j);
58 for (
size_t i = 0; i <
P; i++) {
59 for (
size_t j = 0; j < Q; j++) {
60 self(i, j) = other(i, j);
67 template <
size_t DUMMY = 1>
71 for (
size_t j = 0; j < Q; j++) {
72 self(0, j) = other(j);
77 template<
size_t R,
size_t S>
83 template<
size_t R,
size_t S>
93 for (
size_t i = 0; i < M; i++) {
94 for (
size_t j = 0; j < N; j++) {
95 dst[i*N+j] =
self(i, j);
104 for (
size_t i = 0; i < M; i++) {
105 for (
size_t j = 0; j < N; j++) {
106 dst[i+(j*M)] =
self(i, j);
115 for (
size_t i = 0; i <
P; i++) {
116 for (
size_t j = 0; j < Q; j++) {
117 accum +=
self(i, j)*
self(i, j);
Matrix< Type, M, N > * _data
Type operator()(size_t i, size_t j) const
const Slice< Type, R, S, M, N > slice(size_t x0, size_t y0) const
bool longerThan(Type testVal)
void copyTo(Type dst[M *N]) const
Slice< Type, P, Q, M, N > & operator=(const Matrix< Type, P, Q > &other)
Slice(size_t x0, size_t y0, const Matrix< Type, M, N > *data)
Type & operator()(size_t i, size_t j)
Slice< Type, R, S, M, N > slice(size_t x0, size_t y0)
Slice< Type, P, Q, M, N > & operator=(const Slice< Type, P, Q, MM, NN > &other)
void copyToColumnMajor(Type dst[M *N]) const
Dual< Scalar, N > sqrt(const Dual< Scalar, N > &a)
Slice< Type, 1, Q, M, N > & operator=(const Vector< Type, Q > &other)