template <typename T> void TevaluationPoint<T>::copy( const TevaluationPoint<T> &rhs ){

    nx = rhs.nx;
    na = rhs.na;
    np = rhs.np;
    nu = rhs.nu;
    nw = rhs.nw;
    nd = rhs.nd;
    N  = rhs.N ;

    if( rhs.z != 0 ){
        z = new Tmatrix<T>(*rhs.z);
    }
    else z = 0;

    if( rhs.idx != 0 ){

        idx = new int*[7];
        copyIdx(  1, rhs.idx[0], &idx[0] );
        copyIdx( nx, rhs.idx[1], &idx[1] );
        copyIdx( na, rhs.idx[2], &idx[2] );
        copyIdx( np, rhs.idx[3], &idx[3] );
        copyIdx( nu, rhs.idx[4], &idx[4] );
        copyIdx( nw, rhs.idx[5], &idx[5] );
        copyIdx( nd, rhs.idx[6], &idx[6] );
    }
    else idx = 0;
}
示例#2
0
void EvaluationPoint::copy( const EvaluationPoint &rhs ) {

    uint i;

    nx = rhs.nx;
    na = rhs.na;
    np = rhs.np;
    nu = rhs.nu;
    nw = rhs.nw;
    nd = rhs.nd;
    N  = rhs.N ;

    if( rhs.z != 0 ) {
        z = new double[N];
        for( i = 0; i < N; i++ )
            z[i] = rhs.z[i];
    }
    else z = 0;

    if( rhs.idx != 0 ) {

        idx = new int*[7];
        copyIdx(  1, rhs.idx[0], &idx[0] );
        copyIdx( nx, rhs.idx[1], &idx[1] );
        copyIdx( na, rhs.idx[2], &idx[2] );
        copyIdx( np, rhs.idx[3], &idx[3] );
        copyIdx( nu, rhs.idx[4], &idx[4] );
        copyIdx( nw, rhs.idx[5], &idx[5] );
        copyIdx( nd, rhs.idx[6], &idx[6] );
    }
    else idx = 0;
}