4.4.2.1 Quaternion Objects

class Quaternion
Quaternion( Q, x)

Create the element x of the quaternion algebra Q.

This function should be called only by Q. To create a Quaternion rom x yourself, create Q and then write Q(x).

Instances of class Quaternion have the following methods (in addition to inherited methods and special methods):

characteristic_polynomial,$  $ charpoly,$  $ conjugate,$  $ coordinates,$  $ minimal_polynomial,$  $ minpoly,$  $ norm,$  $ trace,$  $ vector

These methods are defined as follows:

characteristic_polynomial( )

charpoly( )

conjugate( )

coordinates( )

minimal_polynomial( )

minpoly( )

norm( )

trace( )

vector( )

Returns a reference to the vector that defines this quaternion.

Instances of class Quaternion also have the following special methods:

__add__( other)

__cmp__( other)

__div__( other)

__invert__( )

__mul__( other)

__neg__( )

__pow__( n)

__sub__( other)

See About this document... for information on suggesting changes.