mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Fixed compiler error I added to the matrix a moment ago.
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402302
This commit is contained in:
parent
f825990c39
commit
f093374d6d
@ -1423,27 +1423,30 @@ namespace dlib
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
template <typename EXP>
|
struct op_rowm
|
||||||
struct op_rowm : has_destructive_aliasing
|
|
||||||
{
|
{
|
||||||
const static long NR = 1;
|
template <typename EXP>
|
||||||
const static long NC = EXP::NC;
|
struct op : has_destructive_aliasing
|
||||||
typedef typename EXP::type type;
|
{
|
||||||
typedef typename EXP::mem_manager_type mem_manager_type;
|
const static long NR = 1;
|
||||||
template <typename M>
|
const static long NC = EXP::NC;
|
||||||
static type apply ( const M& m, long row, long, long c)
|
typedef typename EXP::type type;
|
||||||
{ return m(row,c); }
|
typedef typename EXP::mem_manager_type mem_manager_type;
|
||||||
|
template <typename M>
|
||||||
|
static type apply ( const M& m, long row, long, long c)
|
||||||
|
{ return m(row,c); }
|
||||||
|
|
||||||
template <typename M>
|
template <typename M>
|
||||||
static long nr (const M& m) { return 1; }
|
static long nr (const M& m) { return 1; }
|
||||||
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,33 +1459,36 @@ 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
template <typename EXP>
|
struct op_colm
|
||||||
struct op_colm : has_destructive_aliasing
|
|
||||||
{
|
{
|
||||||
const static long NR = EXP::NR;
|
template <typename EXP>
|
||||||
const static long NC = 1;
|
struct op : has_destructive_aliasing
|
||||||
typedef typename EXP::type type;
|
{
|
||||||
typedef typename EXP::mem_manager_type mem_manager_type;
|
const static long NR = EXP::NR;
|
||||||
template <typename M>
|
const static long NC = 1;
|
||||||
static type apply ( const M& m, long col, long r, long)
|
typedef typename EXP::type type;
|
||||||
{ return m(r,col); }
|
typedef typename EXP::mem_manager_type mem_manager_type;
|
||||||
|
template <typename M>
|
||||||
|
static type apply ( const M& m, long col, long r, long)
|
||||||
|
{ return m(r,col); }
|
||||||
|
|
||||||
template <typename M>
|
template <typename M>
|
||||||
static long nr (const M& m) { return m.nr(); }
|
static long nr (const M& m) { return m.nr(); }
|
||||||
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
|
|||||||
<< "\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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user