Commit f093374d authored by Davis King's avatar Davis King

Fixed compiler error I added to the matrix a moment ago.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402302
parent f825990c
...@@ -1423,8 +1423,10 @@ namespace dlib ...@@ -1423,8 +1423,10 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
struct op_rowm
{
template <typename EXP> template <typename EXP>
struct op_rowm : has_destructive_aliasing struct op : has_destructive_aliasing
{ {
const static long NR = 1; const static long NR = 1;
const static long NC = EXP::NC; const static long NC = EXP::NC;
...@@ -1439,11 +1441,12 @@ namespace dlib ...@@ -1439,11 +1441,12 @@ namespace dlib
template <typename M> template <typename M>
static long nc (const M& m) { return m.nc(); } static long nc (const M& m) { return m.nc(); }
}; };
};
template < template <
typename EXP typename EXP
> >
const matrix_exp<matrix_scalar_binary_exp<matrix_exp<EXP>,long,op_rowm<EXP> > > rowm ( const matrix_exp<matrix_scalar_binary_exp<matrix_exp<EXP>,long,op_rowm> > rowm (
const matrix_exp<EXP>& m, const matrix_exp<EXP>& m,
long row long row
) )
...@@ -1456,14 +1459,16 @@ namespace dlib ...@@ -1456,14 +1459,16 @@ namespace dlib
<< "\n\trow: " << row << "\n\trow: " << row
); );
typedef matrix_scalar_binary_exp<matrix_exp<EXP>,long,op_rowm<EXP> > exp; typedef matrix_scalar_binary_exp<matrix_exp<EXP>,long,op_rowm> exp;
return matrix_exp<exp>(exp(m,row)); return matrix_exp<exp>(exp(m,row));
} }
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
struct op_colm
{
template <typename EXP> template <typename EXP>
struct op_colm : has_destructive_aliasing struct op : has_destructive_aliasing
{ {
const static long NR = EXP::NR; const static long NR = EXP::NR;
const static long NC = 1; const static long NC = 1;
...@@ -1478,11 +1483,12 @@ namespace dlib ...@@ -1478,11 +1483,12 @@ namespace dlib
template <typename M> template <typename M>
static long nc (const M& m) { return 1; } static long nc (const M& m) { return 1; }
}; };
};
template < template <
typename EXP typename EXP
> >
const matrix_exp<matrix_scalar_binary_exp<matrix_exp<EXP>,long,op_colm<EXP> > > colm ( const matrix_exp<matrix_scalar_binary_exp<matrix_exp<EXP>,long,op_colm> > colm (
const matrix_exp<EXP>& m, const matrix_exp<EXP>& m,
long col long col
) )
...@@ -1495,7 +1501,7 @@ namespace dlib ...@@ -1495,7 +1501,7 @@ namespace dlib
<< "\n\tcol: " << col << "\n\tcol: " << col
); );
typedef matrix_scalar_binary_exp<matrix_exp<EXP>,long,op_colm<EXP> > exp; typedef matrix_scalar_binary_exp<matrix_exp<EXP>,long,op_colm> exp;
return matrix_exp<exp>(exp(m,col)); return matrix_exp<exp>(exp(m,col));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment