linbox
Companion< Field_ > Struct Template Reference

Companion matrix of a monic polynomial. More...

#include <companion.h>

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

Constructor & Destructor Documentation

◆ Companion() [1/2]

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

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: