// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2011 Benoit Jacob <jacob.benoit.1@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include"main.h"
template<typename MatrixType> void zeroReduction(const MatrixType& m) { // Reductions that must hold for zero sized objects
VERIFY(m.all());
VERIFY(!m.any());
VERIFY(m.prod()==1);
VERIFY(m.sum()==0);
VERIFY(m.norm()==0);
VERIFY(m.squaredNorm()==0);
VERIFY(m.count()==0);
VERIFY(m.allFinite());
VERIFY(!m.hasNaN());
VERIFY_RAISES_ASSERT( m.minCoeff() );
VERIFY_RAISES_ASSERT( m.maxCoeff() );
Index i,j;
VERIFY_RAISES_ASSERT( m.minCoeff(&i,&j) );
VERIFY_RAISES_ASSERT( m.maxCoeff(&i,&j) );
VERIFY_RAISES_ASSERT( m.reshaped().minCoeff(&i) );
VERIFY_RAISES_ASSERT( m.reshaped().maxCoeff(&i) );
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.