packages/Alea/mc_solvers/PolynomialBasis.cc
//---------------------------------------------------------------------------//
// Get matrix corresponding to transformation to standard basis
//---------------------------------------------------------------------------//
Get matrix corresponding to transformation to standard basis
Get matrix corresponding to transformation to standard basis
Teuchos::SerialDenseMatrix<LO,SCALAR>
PolynomialBasis::getMonomialBasisTransform(LO k) const
{
    bool zero_out = true;
    Teuchos::SerialDenseMatrix<LO,SCALAR> T(k,k,zero_out);
    T(0,0) = SCALAR_TRAITS::one();
    for( LO i=1; i<k; ++i )
    {
        for( LO j=0; j<i; ++j )
        {
            T(j,i)   += d_alpha * T(j,i-1);
            T(j+1,i) += d_beta * T(j,i-1);
        }
    }
    return T;
}
Teuchos :: SerialDenseMatrix < LO , SCALAR > PolynomialBasis :: getMonomialBasisTransform ( LO k ) const { bool zero_out = true ; Teuchos :: SerialDenseMatrix < LO , SCALAR > T ( k , k , zero_out ) ; T ( 0 , 0 ) = SCALAR_TRAITS :: one ( ) ; for ( LO i = 1 ; i < k ; ++ i ) { for ( LO j = 0 ; j < i ; ++ j ) { T ( j , i ) += d_alpha * T ( j , i - 1 ) ; T ( j + 1 , i ) += d_beta * T ( j , i - 1 ) ; } } return T ; }
Get matrix corresponding to transformation to standard basis
Get matrix corresponding to transformation to standard basis