SheafSystem  0.0.0.0
fiber_bundle::gl2_lite Class Reference

The mathematical group GL(2, R). The group of all invertible, linear transformations on the R2, the 2 dimension vector space over the reals. Equivalent to the set of all invertible 2x2 real matrices (volatile version). More...

#include <gl2.h>

Inheritance diagram for fiber_bundle::gl2_lite:
fiber_bundle::gln_lite fiber_bundle::group_lite fiber_bundle::any_lite

GL2 FACET OF CLASS GL2_LITE

typedef gl2_row_dofs_type< double > row_dofs_type
 The type of the row dofs. More...
 
typedef gl2_row_dofs_type< double >::matrix_type matrix_type
 The type of the associated matrix. More...
 
row_dofs_type _row_dofs
 Row_dofs_type. More...
 
 gl2_lite ()
 Default constructor. More...
 
 gl2_lite (const gl2_lite &xother)
 Copy constructor. More...
 
gl2_liteoperator= (const gl2_lite &xother)
 Assignment operator. More...
 
virtual ~gl2_lite ()
 Destructor. More...
 
 gl2_lite (const row_dofs_type &xrow_dofs)
 Creates a new instance with row dofs xrow_dofs. More...
 
gl2_liteoperator= (const row_dofs_type &xrow_dofs)
 Assignment (from a row dofs type) operator. More...
 
 gl2_lite (const matrix_type &xmatrix)
 Creates a new instance with matrix type xmatrix. More...
 
gl2_liteoperator= (const matrix_type &xmatrix)
 Assignment (from a matrix type) operator. More...
 
 operator matrix_type & ()
 Conversion (cast) operator to convert to the associated matrix type (non const version). More...
 
 operator const matrix_type & () const
 Conversion (cast) operator to convert to the associated matrix type (const version). More...
 
 operator row_dofs_type & ()
 Conversion (cast) operator to convert to the associated row dofs type (non const version). More...
 
 operator const row_dofs_type & () const
 Conversion (cast) operator to convert to the associated row dofs type (const version). More...
 
matrix_typebasis_matrix ()
 The associated basis transformation matrix (non const version). More...
 
const matrix_typebasis_matrix () const
 The associated basis transformation matrix (const version). More...
 
matrix_typecomponent_matrix ()
 The associated component transformation matrix (non const version). More...
 
const matrix_typecomponent_matrix () const
 The associated component transformation matrix (const version). More...
 
void rescale (const value_type &xscale, const value_type &yscale)
 Set this transform to rescale the x and y axes by xscale and yscale, respectively. More...
 
void rotate_z (const value_type &xangle)
 Set this transform to a rotation about the z-axis by angle xangle, in radians. More...
 
void basis (value_type xb0[], value_type xb1[]) const
 The components of the new basis vectors w.r.t. the old basis, pre-allocated version. More...
 
void put_basis (const value_type xb0[], const value_type xb1[])
 Set this transformation to transform to the basis specified by component vectors xb0, xb1, where xbi gives the components of new basis vector i w.r.t. the old basis. More...
 
void get_matrix (row_dofs_type &xmatrix) const
 Copies the row dofs of this into xmatrix. More...
 
void put_matrix (row_dofs_type &xmatrix)
 Updates the component matrix part of xmatrix to be the inverse of the basis part and then copies xmatrix into the row_dofs_of this. More...
 

GLN FACET OF CLASS GL2_LITE

virtual int n () const
 Dimension of the representation space; n in GL(n, R). More...
 

ABSTRACT POSET MEMBER FACET OF CLASS GL2_LITE

virtual const std::string & class_name () const
 The name of this class. More...
 
virtual gl2_liteclone () const
 Virtual constructor, makes a new instance of the same type as this. More...
 
virtual gl2_liteclone (bool xnew_state, bool xauto_access) const
 Virtual constructor, makes a new instance of the same type as this; synonym for clone(), intended for use only in certain templates. More...
 
static const std::string & static_class_name ()
 The name of this class. More...
 

ANY FACET OF CLASS GL2_LITE

virtual bool is_ancestor_of (const any_lite &xother) const
 Conformance test; true if other conforms to this. More...
 
bool invariant () const
 Class invariant. More...
 
virtual void * row_dofs ()
 The row dofs for this instance (mutable version). More...
 
virtual const void * row_dofs () const
 The row dofs for this instance (const version). More...
 

Additional Inherited Members

- Public Types inherited from fiber_bundle::gln_lite
typedef vd_dof_type dof_type
 The type of the degrees of freedom. More...
 
typedef vd_value_type value_type
 The type of component in the fiber; the scalar type in the fiber vector space. More...
 
typedef gln_table_dofs_type table_dofs_type
 The type of the table dofs. More...
 
typedef gln_row_dofs_type< double > row_dofs_type
 The type of the row dofs. More...
 
- Public Types inherited from fiber_bundle::any_lite
typedef any_lite volatile_type
 The associated volatile type. More...
 
- Public Member Functions inherited from fiber_bundle::gln_lite
 gln_lite ()
 Default constructor. More...
 
 gln_lite (const gln_lite &xother)
 Copy constructor. More...
 
gln_liteoperator= (const gln_lite &xother)
 Assignment operator. More...
 
virtual ~gln_lite ()
 Destructor. More...
 
 gln_lite (const row_dofs_type &xrow_dofs)
 Creates a new instance with row dofs xrow_dofs. More...
 
gln_liteoperator= (const row_dofs_type &xrow_dofs)
 Assignment (from row_dofs_type) operator. More...
 
virtual int d () const
 The dimension of the row dof components. More...
 
value_type component (int xindex) const
 The xindex-th component. More...
 
void put_component (int xindex, value_type xcomp)
 Set the xindex-th component to xcomp. More...
 
void components (dof_type xcomps[], int xcomps_dimension) const
 The values of all the components (preallocated version). More...
 
void put_components (const dof_type xcomps[], int xcomps_dimension)
 Set values of all the components to the values in xcomps. More...
 
value_typeoperator[] (int xindex)
 The value of the component corresponding to xindex (non const version). More...
 
const value_typeoperator[] (int xindex) const
 The value of the component corresponding to xindex (const version). More...
 
table_dofs_type table_dofs () const
 The table dofs. More...
 
bool invariant () const
 Class invariant. More...
 
- Public Member Functions inherited from fiber_bundle::group_lite
 group_lite ()
 Default constructor. More...
 
 group_lite (const group_lite &xother)
 Copy constructor. More...
 
group_liteoperator= (const group_lite &xother)
 Assignment operator. More...
 
virtual ~group_lite ()
 Destructor. More...
 
bool invariant () const
 Class invariant. More...
 
- Public Member Functions inherited from fiber_bundle::any_lite
virtual ~any_lite ()
 Destructor. More...
 
bool is_same_type (const any_lite &xother) const
 True if other is the same type as this. More...
 
bool invariant () const
 Class invariant, intended to be redefined in each descendant. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 
- Static Public Member Functions inherited from fiber_bundle::gln_lite
static const std::string & static_class_name ()
 The name of this class. More...
 
- Static Public Member Functions inherited from fiber_bundle::group_lite
static const std::string & static_class_name ()
 The name of this class. More...
 
- Static Public Member Functions inherited from fiber_bundle::any_lite
static const std::string & static_class_name ()
 The name of this class. More...
 
- Protected Member Functions inherited from fiber_bundle::any_lite
 any_lite ()
 Default constructor. More...
 

Detailed Description

The mathematical group GL(2, R). The group of all invertible, linear transformations on the R2, the 2 dimension vector space over the reals. Equivalent to the set of all invertible 2x2 real matrices (volatile version).

Definition at line 173 of file gl2.h.

Member Typedef Documentation

◆ matrix_type

The type of the associated matrix.

Definition at line 192 of file gl2.h.

◆ row_dofs_type

The type of the row dofs.

Definition at line 187 of file gl2.h.

Constructor & Destructor Documentation

◆ gl2_lite() [1/4]

fiber_bundle::gl2_lite::gl2_lite ( )

Default constructor.

Postcondition

Definition at line 50 of file gl2.cc.

Referenced by operator=(), and ~gl2_lite().

◆ gl2_lite() [2/4]

fiber_bundle::gl2_lite::gl2_lite ( const gl2_lite xother)

Copy constructor.

Precondition
  • -unexecutable( "The component matrix is the inverse of the basis matrix." )
Postcondition

Definition at line 65 of file gl2.cc.

References operator=().

◆ ~gl2_lite()

fiber_bundle::gl2_lite::~gl2_lite ( )
virtual

Destructor.

Definition at line 107 of file gl2.cc.

References gl2_lite().

Referenced by operator=().

◆ gl2_lite() [3/4]

fiber_bundle::gl2_lite::gl2_lite ( const row_dofs_type xrow_dofs)

Creates a new instance with row dofs xrow_dofs.

Precondition
  • -unexecutable( "The component matrix is the inverse of the basis matrix." )
Postcondition

Definition at line 120 of file gl2.cc.

References operator=().

◆ gl2_lite() [4/4]

fiber_bundle::gl2_lite::gl2_lite ( const matrix_type xmatrix)

Creates a new instance with matrix type xmatrix.

Precondition
  • -unexecutable( "The component matrix is the inverse of the basis matrix." )
Postcondition

Definition at line 159 of file gl2.cc.

References operator=().

Member Function Documentation

◆ basis()

void fiber_bundle::gl2_lite::basis ( value_type  xb0[],
value_type  xb1[] 
) const

The components of the new basis vectors w.r.t. the old basis, pre-allocated version.

Precondition
  • -unexecutable( "Each xbi is a vector of length at least 2." )
Postcondition
  • -unexecutable( "Return values are set to the correct components" )

Definition at line 403 of file gl2.cc.

References put_basis().

Referenced by rotate_z().

◆ basis_matrix() [1/2]

fiber_bundle::gl2_lite::matrix_type & fiber_bundle::gl2_lite::basis_matrix ( )

The associated basis transformation matrix (non const version).

Definition at line 265 of file gl2.cc.

Referenced by fiber_bundle::inverse(), and operator const row_dofs_type &().

◆ basis_matrix() [2/2]

const fiber_bundle::gl2_lite::matrix_type & fiber_bundle::gl2_lite::basis_matrix ( ) const

The associated basis transformation matrix (const version).

Definition at line 282 of file gl2.cc.

References component_matrix().

◆ class_name()

const std::string & fiber_bundle::gl2_lite::class_name ( ) const
virtual

The name of this class.

Postcondition
  • !result.empty()

Reimplemented from fiber_bundle::gln_lite.

Definition at line 577 of file gl2.cc.

References static_class_name().

Referenced by n().

◆ clone() [1/2]

fiber_bundle::gl2_lite * fiber_bundle::gl2_lite::clone ( ) const
virtual

Virtual constructor, makes a new instance of the same type as this.

Postcondition
  • result != 0
  • is_same_type(*result)

Reimplemented from fiber_bundle::gln_lite.

Definition at line 615 of file gl2.cc.

References is_ancestor_of().

Referenced by static_class_name().

◆ clone() [2/2]

virtual gl2_lite* fiber_bundle::gl2_lite::clone ( bool  xnew_state,
bool  xauto_access 
) const
inlinevirtual

Virtual constructor, makes a new instance of the same type as this; synonym for clone(), intended for use only in certain templates.

Definition at line 400 of file gl2.h.

References fiber_bundle::gl2_row_dofs_type< T >::clone(), and sheaf::row_dofs().

◆ component_matrix() [1/2]

fiber_bundle::gl2_lite::matrix_type & fiber_bundle::gl2_lite::component_matrix ( )

The associated component transformation matrix (non const version).

Definition at line 299 of file gl2.cc.

Referenced by basis_matrix(), and fiber_bundle::inverse().

◆ component_matrix() [2/2]

const fiber_bundle::gl2_lite::matrix_type & fiber_bundle::gl2_lite::component_matrix ( ) const

The associated component transformation matrix (const version).

Definition at line 314 of file gl2.cc.

References rescale().

◆ get_matrix()

void fiber_bundle::gl2_lite::get_matrix ( row_dofs_type xmatrix) const

Copies the row dofs of this into xmatrix.

Precondition
  • -unexecutable( "Each xbi is a vector of length at least 3." )
Postcondition
  • for(int i = ( 0 ); i < ( d() ); ++ i ) xmatrix.components[i] == component(i)

Definition at line 469 of file gl2.cc.

References fiber_bundle::gl2_row_dofs_type< T >::components, and put_matrix().

Referenced by put_basis().

◆ invariant()

bool fiber_bundle::gl2_lite::invariant ( ) const

Class invariant.

Invariant

Definition at line 667 of file gl2.cc.

References row_dofs().

Referenced by is_ancestor_of().

◆ is_ancestor_of()

bool fiber_bundle::gl2_lite::is_ancestor_of ( const any_lite xother) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • &xother != 0

Reimplemented from fiber_bundle::gln_lite.

Definition at line 648 of file gl2.cc.

References invariant().

Referenced by clone().

◆ n()

int fiber_bundle::gl2_lite::n ( ) const
virtual

Dimension of the representation space; n in GL(n, R).

Postcondition
  • result == 2

Reimplemented from fiber_bundle::gln_lite.

Definition at line 535 of file gl2.cc.

References class_name().

Referenced by put_matrix().

◆ operator const matrix_type &()

fiber_bundle::gl2_lite::operator const gl2_lite::matrix_type & ( ) const

Conversion (cast) operator to convert to the associated matrix type (const version).

Definition at line 216 of file gl2.cc.

◆ operator const row_dofs_type &()

fiber_bundle::gl2_lite::operator const gl2_lite::row_dofs_type & ( ) const

Conversion (cast) operator to convert to the associated row dofs type (const version).

Definition at line 248 of file gl2.cc.

References basis_matrix().

◆ operator matrix_type &()

fiber_bundle::gl2_lite::operator gl2_lite::matrix_type & ( )

Conversion (cast) operator to convert to the associated matrix type (non const version).

Definition at line 200 of file gl2.cc.

◆ operator row_dofs_type &()

fiber_bundle::gl2_lite::operator gl2_lite::row_dofs_type & ( )

Conversion (cast) operator to convert to the associated row dofs type (non const version).

Definition at line 232 of file gl2.cc.

◆ operator=() [1/3]

fiber_bundle::gl2_lite & fiber_bundle::gl2_lite::operator= ( const gl2_lite xother)

Assignment operator.

Precondition
  • -unexecutable( "The component matrix is the inverse of the basis matrix." )
Postcondition

Definition at line 84 of file gl2.cc.

References _row_dofs, and ~gl2_lite().

Referenced by gl2_lite().

◆ operator=() [2/3]

fiber_bundle::gl2_lite & fiber_bundle::gl2_lite::operator= ( const row_dofs_type xrow_dofs)

Assignment (from a row dofs type) operator.

Precondition
  • -unexecutable( "The component matrix is the inverse of the basis matrix." )
Postcondition

Definition at line 139 of file gl2.cc.

References gl2_lite().

◆ operator=() [3/3]

fiber_bundle::gl2_lite & fiber_bundle::gl2_lite::operator= ( const matrix_type xmatrix)

Assignment (from a matrix type) operator.

Precondition
  • -unexecutable( "The component matrix is the inverse of the basis matrix." )
Postcondition

Definition at line 178 of file gl2.cc.

◆ put_basis()

void fiber_bundle::gl2_lite::put_basis ( const value_type  xb0[],
const value_type  xb1[] 
)

Set this transformation to transform to the basis specified by component vectors xb0, xb1, where xbi gives the components of new basis vector i w.r.t. the old basis.

Precondition
  • -unexecutable( "Each xbi is a vector of length at least 2." )
Postcondition
  • -unexecutable( "Components are set to the correct basis values" )
  • -unexecutable( "The component matrix is the inverse of the basis matrix" )

Definition at line 434 of file gl2.cc.

References get_matrix().

Referenced by basis().

◆ put_matrix()

void fiber_bundle::gl2_lite::put_matrix ( row_dofs_type xmatrix)

Updates the component matrix part of xmatrix to be the inverse of the basis part and then copies xmatrix into the row_dofs_of this.

Precondition
Postcondition
  • for(int i = ( 0 ); i < ( d() ); ++ i ) component(i) == xmatrix.components[i]
  • -unexecutable( "The component matrix is the inverse of the basis matrix" )

Definition at line 493 of file gl2.cc.

References fiber_bundle::gl2_row_dofs_type< T >::basis_matrix(), fiber_bundle::gl2_row_dofs_type< T >::component_matrix(), fiber_bundle::gl2_row_dofs_type< T >::components, fiber_bundle::general_matrix_2x2< T >::determinant(), fiber_bundle::general_matrix_2x2< T >::inverse(), and n().

Referenced by get_matrix().

◆ rescale()

void fiber_bundle::gl2_lite::rescale ( const value_type xscale,
const value_type yscale 
)

Set this transform to rescale the x and y axes by xscale and yscale, respectively.

Definition at line 331 of file gl2.cc.

References rotate_z().

Referenced by component_matrix().

◆ rotate_z()

void fiber_bundle::gl2_lite::rotate_z ( const value_type xangle)

Set this transform to a rotation about the z-axis by angle xangle, in radians.

Note: this routine constructs the basis transformation matrix, not the component transformation matrix. More specifically:

Let the old basis be f-hat, considered as a row of vectors with f-hat[i] the i-th basis vector. Similary, let e-hat be the new basis. Then this matrix is defined such that the i-th column, lm.[*][i] contains the components of e-hat[i] with respect to f-hat. Since a basis is a row of vectors, basis transformation corresponds to the matrix equation: e-hat = f-hat*this.

Definition at line 369 of file gl2.cc.

References basis(), fiber_bundle::sec_at0_algebra::cos(), and fiber_bundle::sec_at0_algebra::sin().

Referenced by rescale().

◆ row_dofs() [1/2]

void * fiber_bundle::gl2_lite::row_dofs ( )
virtual

The row dofs for this instance (mutable version).

Reimplemented from fiber_bundle::any_lite.

Definition at line 695 of file gl2.cc.

Referenced by invariant().

◆ row_dofs() [2/2]

const void * fiber_bundle::gl2_lite::row_dofs ( ) const
virtual

The row dofs for this instance (const version).

Reimplemented from fiber_bundle::any_lite.

Definition at line 702 of file gl2.cc.

References fiber_bundle::gl2::standard_schema_path().

◆ static_class_name()

const std::string & fiber_bundle::gl2_lite::static_class_name ( )
static

The name of this class.

Postcondition
  • !result.empty()

Definition at line 596 of file gl2.cc.

References clone().

Referenced by class_name().

Member Data Documentation

◆ _row_dofs

row_dofs_type fiber_bundle::gl2_lite::_row_dofs
protected

Row_dofs_type.

Definition at line 335 of file gl2.h.

Referenced by operator=().


The documentation for this class was generated from the following files: