Esempio n. 1
0
void CoordinatesToSparse
( const Matrix<F>& N,
  const Matrix<F>& v,
        Matrix<F>& y )
{
    DEBUG_ONLY(CSE cse("svp::CoordinatesToSparse"))
    y = v;
    Trmv( UPPER, NORMAL, UNIT, N, y );
    Round( y );
}
Esempio n. 2
0
void TransposedCoordinatesToSparse
( const Matrix<F>& NTrans,
  const Matrix<F>& v,
        Matrix<F>& y )
{
    DEBUG_ONLY(CSE cse("svp::TransposedCoordinatesToSparse"))
    y = v;
    Trmv( LOWER, TRANSPOSE, UNIT, NTrans, y );
    Round( y );
}
Esempio n. 3
0
void TransposedCoordinatesToSparse
( const Matrix<Field>& NTrans,
  const Matrix<Field>& v,
        Matrix<Field>& y )
{
    EL_DEBUG_CSE
    y = v;
    Trmv( LOWER, TRANSPOSE, UNIT, NTrans, y );
    Round( y );
}
Esempio n. 4
0
void CoordinatesToSparse
( const Matrix<Field>& N,
  const Matrix<Field>& v,
        Matrix<Field>& y )
{
    EL_DEBUG_CSE
    y = v;
    Trmv( UPPER, NORMAL, UNIT, N, y );
    Round( y );
}
Esempio n. 5
0
Base<Field> TransposedCoordinatesToNorm
( const Matrix<Base<Field>>& d,
  const Matrix<Field>& NTrans,
  const Matrix<Field>& v )
{
    EL_DEBUG_CSE
    Matrix<Field> z( v );
    Trmv( LOWER, TRANSPOSE, UNIT, NTrans, z );
    DiagonalScale( LEFT, NORMAL, d, z );
    return FrobeniusNorm( z );
}
Esempio n. 6
0
Base<Field> CoordinatesToNorm
( const Matrix<Base<Field>>& d,
  const Matrix<Field>& N,
  const Matrix<Field>& v )
{
    EL_DEBUG_CSE
    Matrix<Field> z( v );
    Trmv( UPPER, NORMAL, UNIT, N, z );
    DiagonalScale( LEFT, NORMAL, d, z );
    return FrobeniusNorm( z );
}
Esempio n. 7
0
Matrix<Base<Field>> BatchTransposedCoordinatesToNorms
( const Matrix<Base<Field>>& d,
  const Matrix<Field>& NTrans,
  const Matrix<Field>& V,
        Int numNested=1 )
{
    EL_DEBUG_CSE
    Matrix<Field> Z( V );
    // TODO(poulson): Decide whether this branch is necessary or not...
    if( V.Width() == 1 )
        Trmv( LOWER, TRANSPOSE, UNIT, NTrans, Z );
    else
        Trmm( LEFT, LOWER, TRANSPOSE, UNIT, Field(1), NTrans, Z );
    DiagonalScale( LEFT, NORMAL, d, Z );

    return NestedColumnTwoNorms( Z, numNested );
}