linbox
Companion< Field_ > Struct Template Reference

Companion matrix of a monic polynomial. More...

#include <companion.h>

+ Inheritance diagram for Companion< Field_ >:

Data Structures

struct  rebind
 

Public Types

typedef Field_ Field
 
typedef SparseMatrix< Field, SparseMatrixFormat::CSRFather_t
 

Public Member Functions

template<class Polynomial>
 Companion (const Field &F, const Polynomial &P)
 This is the n by n companion matrix of a given polynomial of degree n.
 
 Companion (const Field &F)
 zero matrix
 
 Companion (const Field &F, size_t n, typename Field::RandIter r)
 This constructs a random companion matrix.
 
 Companion (const Field &F, size_t n)
 This constructs a random companion matrix.
 

Detailed Description

template<class Field_>
struct LinBox::Companion< Field_ >

Companion matrix of a monic polynomial.

Warning
companion would be faster if built direct, using one axpy per entry: y_i = x_i-1 + p_i*x_n

Member Typedef Documentation

◆ Field

template<class Field_>
typedef Field_ Field

◆ Father_t

template<class Field_>
typedef SparseMatrix<Field,SparseMatrixFormat::CSR> Father_t

Constructor & Destructor Documentation

◆ Companion() [1/4]

template<class Field_>
template<class Polynomial>
Companion ( const Field & F,
const Polynomial & P )
inline

This is the n by n companion matrix of a given polynomial of degree n.

◆ Companion() [2/4]

template<class Field_>
Companion ( const Field & F)
inline

zero matrix

◆ Companion() [3/4]

template<class Field_>
Companion ( const Field & F,
size_t n,
typename Field::RandIter r )
inline

This constructs a random companion matrix.

Builds n by n matrix from degree n monic poly with other coefficients random.

Warning
should it be a constructor ?

◆ Companion() [4/4]

template<class Field_>
Companion ( const Field & F,
size_t n )
inline

This constructs a random companion matrix.

Builds n by n matrix from degree n monic poly with other coefficients random.

Warning
should it be a constructor ?

The documentation for this struct was generated from the following file: