NeoPZ
Classes | Public Member Functions | Private Attributes | List of all members
TPZLink< ElemType > Class Template Reference

Implements a linked list of ElemType elements. Matrix utility. More...

#include <pzlink.h>

Collaboration diagram for TPZLink< ElemType >:
[legend]

Classes

struct  Node
 Node structure. More...
 

Public Member Functions

 TPZLink ()
 Simple constructor. More...
 
 ~TPZLink ()
 Simple destructor. More...
 
TPZLink< ElemType > & operator= (TPZLink< ElemType > &)
 
int Head ()
 Returns to the head of the list. More...
 
int Next ()
 Moves to the next element on list. More...
 
int Get (ElemType *pElem)
 Returns an element from the list. More...
 
ElemType * GetNode ()
 Returns the node's element type. More...
 
int GetLast (ElemType *pElem)
 Returns the last element on the list. More...
 
Manipulators

Those methods implement manipulations routine with the linked list

int Insert (ElemType &elem)
 Inserts a element on the list. More...
 
int Append (ElemType &elem)
 Appends an element to the list. More...
 
int Remove ()
 Removes an element from the list. More...
 
int Update (ElemType &elem)
 Updates the current list. More...
 
int Clear ()
 Clears the entire list. More...
 

Private Attributes

NodefHead
 Pointer to head of the list. More...
 
NodefLast
 Pointer to last element on list. More...
 
NodefThis
 Pointer to current element. More...
 
Node ** fpBefore
 

Detailed Description

template<class ElemType>
class TPZLink< ElemType >

Implements a linked list of ElemType elements. Matrix utility.

Definition at line 24 of file pzlink.h.

Constructor & Destructor Documentation

◆ TPZLink()

template<class ElemType >
TPZLink< ElemType >::TPZLink ( )

Simple constructor.

Definition at line 13 of file pzlink.cpp.

◆ ~TPZLink()

template<class ElemType >
TPZLink< ElemType >::~TPZLink ( )

Simple destructor.

Definition at line 25 of file pzlink.cpp.

Member Function Documentation

◆ Append()

template<class ElemType>
int TPZLink< ElemType >::Append ( ElemType &  elem)

Appends an element to the list.

Parameters
&elemElement being appended

Definition at line 75 of file pzlink.cpp.

Referenced by TPZSSpMatrix< TVar >::Decompose_LDLt().

◆ Clear()

template<class ElemType >
int TPZLink< ElemType >::Clear ( )

Clears the entire list.

Definition at line 146 of file pzlink.cpp.

Referenced by TPZSSpMatrix< TVar >::Decompose_LDLt().

◆ Get()

template<class ElemType>
int TPZLink< ElemType >::Get ( ElemType *  pElem)
inline

◆ GetLast()

template<class ElemType>
int TPZLink< ElemType >::GetLast ( ElemType *  pElem)
inline

Returns the last element on the list.

Parameters
*pElemcontains the last element

Definition at line 161 of file pzlink.h.

Referenced by TPZSSpMatrix< TVar >::Subst_Diag().

◆ GetNode()

template<class ElemType >
ElemType * TPZLink< ElemType >::GetNode ( )
inline

Returns the node's element type.

Definition at line 152 of file pzlink.h.

Referenced by TPZSpMatrix< TVar >::GetVal(), and TPZSpMatrix< TVar >::MultAdd().

◆ Head()

template<class ElemType >
int TPZLink< ElemType >::Head ( )
inline

◆ Insert()

template<class ElemType>
int TPZLink< ElemType >::Insert ( ElemType &  elem)

Inserts a element on the list.

Parameters
&elemElement being inserted

Definition at line 48 of file pzlink.cpp.

Referenced by TPZSSpMatrix< TVar >::Decompose_Cholesky(), TPZSSpMatrix< TVar >::Decompose_LDLt(), and TPZSpMatrix< TVar >::PutVal().

◆ Next()

template<class ElemType >
int TPZLink< ElemType >::Next ( )
inline

◆ operator=()

template<class ElemType>
TPZLink< ElemType > & TPZLink< ElemType >::operator= ( TPZLink< ElemType > &  src)

Definition at line 171 of file pzlink.cpp.

◆ Remove()

template<class ElemType >
int TPZLink< ElemType >::Remove ( )

Removes an element from the list.

Definition at line 93 of file pzlink.cpp.

Referenced by TPZSpMatrix< TVar >::PutVal().

◆ Update()

template<class ElemType>
int TPZLink< ElemType >::Update ( ElemType &  elem)

Updates the current list.

Parameters
&elemUpdated element on the list

Definition at line 131 of file pzlink.cpp.

Referenced by TPZSSpMatrix< TVar >::Decompose_Cholesky(), TPZSSpMatrix< TVar >::Decompose_LDLt(), TPZSpMatrix< TVar >::fMult(), and TPZSpMatrix< TVar >::PutVal().

Member Data Documentation

◆ fHead

template<class ElemType>
Node* TPZLink< ElemType >::fHead
private

Pointer to head of the list.

Definition at line 100 of file pzlink.h.

Referenced by TPZLink< TPZSpMatrix::TPZNode >::Head().

◆ fLast

template<class ElemType>
Node* TPZLink< ElemType >::fLast
private

Pointer to last element on list.

Definition at line 102 of file pzlink.h.

Referenced by TPZLink< TPZSpMatrix::TPZNode >::GetLast().

◆ fpBefore

template<class ElemType>
Node** TPZLink< ElemType >::fpBefore
private

◆ fThis

template<class ElemType>
Node* TPZLink< ElemType >::fThis
private

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