Registered Member
|
Hello,
i have got a StrictlyUpperTriangular Matrix. I am interesting in a possiblity to search minimum only in this triangular matrix for finding the minimum faster as searching in the whole matrix. Thanks for help
Xtremecpp, proud to be a member of KDE forums since 2008-Dec.
|
Registered Member
|
Triangular visitors and reductions aren't implemented yet.
This means that there is currently no way to tell minCoeff() to take advantage of triangularness. You'll have to write your own code with for loops. One trick: since you're going to do a lot of coefficient access, you don't want to pay the price of an assertion everytime. So use MatrixBase::coeff(int,int) instead of MatrixBase::operator()(int,int) to read coefficients.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
thanks for this trick, helped me very well.
Existing same alternative for write access too?
Xtremecpp, proud to be a member of KDE forums since 2008-Dec.
|
Registered Member
|
Yep, it's called coeffRef(int,int) Notice that for vectors you also have variants taking only one int parameter.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell