Make max/minCoeff templated on index type
See merge request oss/rotgen!23
This commit is contained in:
parent
c40a947daa
commit
d667fd28b5
12 changed files with 157 additions and 18 deletions
|
|
@ -181,6 +181,29 @@ namespace rotgen
|
|||
return *this;
|
||||
}
|
||||
|
||||
auto minCoeff() const { return parent::minCoeff(); }
|
||||
auto maxCoeff() const { return parent::maxCoeff(); }
|
||||
|
||||
template<std::integral IndexType>
|
||||
auto minCoeff(IndexType* row, IndexType* col) const
|
||||
{
|
||||
Index r,c;
|
||||
auto result = parent::minCoeff(&r, &c);
|
||||
*row = r;
|
||||
*col = c;
|
||||
return result;
|
||||
}
|
||||
|
||||
template<std::integral IndexType>
|
||||
auto maxCoeff(IndexType* row, IndexType* col) const
|
||||
{
|
||||
Index r,c;
|
||||
auto result = parent::maxCoeff(&r, &c);
|
||||
*row = r;
|
||||
*col = c;
|
||||
return result;
|
||||
}
|
||||
|
||||
static auto Zero() requires( requires {Ref::Zero();} )
|
||||
{
|
||||
return Ref::Zero();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue