LDA.cpp eigennized

I have changed the LAPACK codes into EIGEN3 for the binary classification through LDA.
Is this cast always guaranteed to work, if a user passes non binary labels? Should be checked either by dynamic cast or the enum for label type