simplification
This commit is contained in:
@@ -43,14 +43,10 @@ ones(const uword n_elem, const arma_empty_class junk1 = arma_empty_class(), cons
|
||||
arma_ignore(junk1);
|
||||
arma_ignore(junk2);
|
||||
|
||||
if(is_Row<obj_type>::value)
|
||||
{
|
||||
return Gen<obj_type, gen_ones>(1, n_elem);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Gen<obj_type, gen_ones>(n_elem, 1);
|
||||
}
|
||||
const uword n_rows = (is_Row<obj_type>::value) ? uword(1) : n_elem;
|
||||
const uword n_cols = (is_Row<obj_type>::value) ? n_elem : uword(1);
|
||||
|
||||
return Gen<obj_type, gen_ones>(n_rows, n_cols);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,14 +43,10 @@ zeros(const uword n_elem, const arma_empty_class junk1 = arma_empty_class(), con
|
||||
arma_ignore(junk1);
|
||||
arma_ignore(junk2);
|
||||
|
||||
if(is_Row<obj_type>::value)
|
||||
{
|
||||
return Gen<obj_type, gen_zeros>(1, n_elem);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Gen<obj_type, gen_zeros>(n_elem, 1);
|
||||
}
|
||||
const uword n_rows = (is_Row<obj_type>::value) ? uword(1) : n_elem;
|
||||
const uword n_cols = (is_Row<obj_type>::value) ? n_elem : uword(1);
|
||||
|
||||
return Gen<obj_type, gen_zeros>(n_rows, n_cols);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user