This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template < class MatrixType > | |
MatrixType inverse(const MatrixType & m) | |
{ | |
typedef itk::Vector<typename MatrixType::ValueType, MatrixType::RowDimensions> VectorType; | |
typedef itk::SymmetricEigenAnalysis<MatrixType,VectorType> EigenAnalysisType; | |
EigenAnalysisType eigenAnalysis; | |
eigenAnalysis.SetOrderEigenMagnitudes(true); // order by abs val of eigenvals.. | |
eigenAnalysis.SetDimension(MatrixType::RowDimensions); | |
VectorType eigenVals; | |
MatrixType eigenVecs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ssh-agent singleton setup | |
# If no SSH agent is already running, start one now. Re-use sockets so we never | |
# have to start more than one session. | |
export SSH_AUTH_SOCK=$HOME/.ssh-socket | |
NKEYS_SSHAGENT=`ssh-add -l 2> /dev/null | wc -l` | |
if [ $NKEYS_SSHAGENT = 0 ]; then | |
# No ssh-agent running | |
rm -f $SSH_AUTH_SOCK | |
ssh-agent -a $SSH_AUTH_SOCK >/tmp/.ssh-script | |
source /tmp/.ssh-script |
NewerOlder