linbox
Public Member Functions
Companion< Field_ > Struct Template Reference

Companion matrix of a monic polynomial. More...

#include <companion.h>

Inherits SparseMatrix< _Field, _Storage >.

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. More...
 
 Companion (const Field &F, size_t n)
 This constructs a random companion matrix. More...
 

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
Examples:
examples/samplebb.C.

Constructor & Destructor Documentation

◆ Companion() [1/2]

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() [2/2]

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: