Table of contents

Globals

Globals top

Default namespace

Table of contents

Enumeration: MathExceptions

Class: IIterator

Class: LinkedList

Class: LinkedListItem

Class: LinkedListIterator

Class: LinkedListOrderedIterator

Class: ManagedBuffer

Class: MathException

Struct: Size2D

Class: basic_Matrix2D

Operator: <<

Function: main

Enumerations

MathExceptions up | top

Enumeration

ME_MatrixEmpty (0 (0)), ME_OutOfBounds (1), ME_MatrixSizeNotEqual (2), ME_RowColumnMissMatch (3), ME_MatrixNotSquare (4), ME_SizeNotEqualOrGreat (5), ME_InexistantColumn (6), ME_InexistantRow (7)

Functions

Operator << up | top

Operator

Returns: ostream &

Parameters

out (ostream&), exception (MathException&)

main up | top

Function

Returns: int

IIterator up | top

Class

Generic iterator interface.

Templates: _T: class

Table of contents

Operator: !

Operator: _T*

Operator: bool

Function: eof

Function: get

Function: reset

Operator ! up | top

Operator

Returns: bool

This method resets the iterator

_T* up | top

Operator

Returns: _T*

This method gets the next item and moves item pointer to the next one

bool up | top

Operator

Returns: bool

This method returns whether iterator is at the last item

eof up | top

Function

Returns: bool

This method returns whether iterator is at the last item

get up | top

Function

Returns: _T*

This method gets the next item and moves item pointer to the next one

reset up | top

Function

Returns: void

This method resets the iterator

LinkedList up | top

Class

This class is a linked list structure. It allows insert and remove operations as well as sorted item query and iterators.

Templates: _T: class

Table of contents

Variables

Operator: LinkedListIterator<_T>

Operator: LinkedListOrderedIterator<_T>

Operator: []

Function: Add

Function: AddItem

Function: AddItem

Function: Clear

Function: Destroy

Function: FindListItem

Function: GetIterator

Function: GetOrderedIterator

Function: GetReverseIterator

Function: GetReverseOrderedIterator

Function: HighestOrder

Function: ItemAt

Function: ListItemAt

Function: LowestOrder

Function: OrderedItemAt

Function: OrderedListItemAt

Function: Remove

Function: Remove

Function: Remove

Function: getCount

Function: getFirst

Function: getFirstItem

Function: getLast

Function: getLastItem

Function: getOrderedFirst

Function: getOrderedFirstItem

Function: getOrderedLast

Function: getOrderedLastItem

Function: grow

Function: obtain

Function: setOrderOf

Function: setOrderOf

Variables

Pool (LinkedListItem <_T> **), count (int)

growth (int): The amount of growth for each step

poolid (int)

LinkedListIterator<_T> up | top

Operator

Returns: LinkedListIterator<_T>

Creates an iterator object

LinkedListOrderedIterator<_T> up | top

Operator

Returns: LinkedListOrderedIterator<_T>

Creates an ordered iterator object

Operator [] up | top

Operator

Returns: _T *

Returns an item from a given position

Parameters

Position (int)

Add up | top

Function

Returns: LinkedListItem<_T> *

AddItem up | top

Function

Returns: LinkedListItem<_T> *

AddItem up | top

Function

Returns: LinkedListItem<_T> *

Adds a new item to the list. This function returns the list item that surrounds the newly added item

Parameters

Item (_T*): The item to be added to the list

Order (float): The order of the item to be added

Clear up | top

Function

Returns: void

Clears the entire list

Destroy up | top

Function

Returns: void

Destroys the list by freeing every member and removing them

FindListItem up | top

Function

Returns: LinkedListItem<_T> *

Searches a specific item in the list and returns the list item. If item is not found NULL is returned

Parameters

Item (_T*)

GetIterator up | top

Function

Returns: LinkedListIterator<_T>

Creates an iterator object

GetOrderedIterator up | top

Function

Returns: LinkedListOrderedIterator<_T>

Creates an ordered iterator object

GetReverseIterator up | top

Function

Returns: LinkedListIterator<_T>

Creates a reverse iterator object

GetReverseOrderedIterator up | top

Function

Returns: LinkedListOrderedIterator<_T>

Creates an ordered reverse iterator object

HighestOrder up | top

Function

Returns: float

ItemAt up | top

Function

Returns: _T *

Returns an item from a given position

Parameters

Position (int)

ListItemAt up | top

Function

Returns: LinkedListItem<_T> *

Returns a list item from a given position

Parameters

Position (int)

LowestOrder up | top

Function

Returns: float

OrderedItemAt up | top

Function

Returns: _T *

Returns an item from a given ordered position

Parameters

Position (int)

OrderedListItemAt up | top

Function

Returns: LinkedListItem<_T> *

Returns a list item from a given ordered position

Parameters

Position (int)

Remove up | top

Function

Returns: void

Removes an item from the list

Parameters

item (LinkedListItem <_T> *)

Remove up | top

Function

Returns: void

Removes an item from the list

Parameters

Item (_T*)

Remove up | top

Function

Returns: void

Removes an item from the list

Parameters

Position (int)

getCount up | top

Function

Returns: int

Returns number of elements

getFirst up | top

Function

Returns: LinkedListItem<_T> *

Gets the first item in list. Returns item wrapper

getFirstItem up | top

Function

Returns: _T *

Gets the first item in list. Returns item itself

getLast up | top

Function

Returns: LinkedListItem<_T> *

Gets the last item in list. Returns item wrapper

getLastItem up | top

Function

Returns: _T *

Gets the last item in list. Returns item itself

getOrderedFirst up | top

Function

Returns: LinkedListItem<_T> *

Gets the first item in ordered list. Returns item wrapper

getOrderedFirstItem up | top

Function

Returns: _T *

Gets the first item in ordered list. Returns item itself

getOrderedLast up | top

Function

Returns: LinkedListItem<_T> *

Gets the last item in ordered list. Returns item wrapper

getOrderedLastItem up | top

Function

Returns: _T *

Gets the last item in ordered list. Returns item itself

grow up | top

Function

Returns: void

obtain up | top

Function

Returns: LinkedListItem<_T>*

setOrderOf up | top

Function

Returns: void

Changes the order of an item

Parameters

Item (LinkedListItem <_T> *): The item to be reordered

Order (float): The new order

setOrderOf up | top

Function

Returns: void

Changes the order of an item

Parameters

Position (int): position of the item to be reordered

Order (float): The new order

LinkedListItem up | top

Class

This class is a wrapper to all objects that will be added to a linked list. This wrapper contains linked list structure, order, the item and few other useful functions.

Templates: _T: class

Table of contents

Variables

Function: getNext

Function: getOrder

Function: getOrderedNext

Function: getOrderedPrevious

Function: getPrevious

Function: setOrder

Variables

Item (_T*): The item

Order (float), parent (LinkedList <_T> *)

getNext up | top

Function

Returns: LinkedListItem<_T> *

Returns the next element in the list, if this is the last item returns NULL

getOrder up | top

Function

Returns: float

Returns the order of this list item

getOrderedNext up | top

Function

Returns: LinkedListItem<_T> *

Returns the next element in the ordered list, if this is the last item returns NULL

getOrderedPrevious up | top

Function

Returns: LinkedListItem<_T> *

Returns the previous element in the ordered list, if this is the first item returns NULL

getPrevious up | top

Function

Returns: LinkedListItem<_T> *

Returns the previous element in the list, if this is the first item returns NULL

setOrder up | top

Function

Returns: void

Changes the order of this item

Parameters

Order (float)

LinkedListIterator up | top

Class

Inherits: IIterator <_T>

Templates: _T: class

Table of contents

Variables

Operator: LinkedListItem<_T>*

Function: eof

Function: get

Function: getitem

Function: reset

Variables

reverse (bool)

LinkedListItem<_T>* up | top

Operator

Returns: LinkedListItem<_T>*

This method gets the next item and moves item pointer to the next one

eof up | top

Function

Returns: bool

This method returns whether iterator is at the last item

get up | top

Function

Returns: _T*

This method gets the next item and moves item pointer to the next one

getitem up | top

Function

Returns: LinkedListItem<_T>*

This method gets the next list item and moves item pointer to the next one

reset up | top

Function

Returns: void

This method resets the iterator

LinkedListOrderedIterator up | top

Class

This iterator class iterates through sorted linked list

Inherits: IIterator <_T>

Templates: _T: class

Table of contents

Variables

Operator: LinkedListItem<_T>*

Function: eof

Function: get

Function: getitem

Function: reset

Variables

reverse (bool)

LinkedListItem<_T>* up | top

Operator

Returns: LinkedListItem<_T>*

This method gets the next item and moves item pointer to the next one

eof up | top

Function

Returns: bool

This method returns whether iterator is at the last item

get up | top

Function

Returns: _T*

This method gets the next item and moves item pointer to the next one

getitem up | top

Function

Returns: LinkedListItem<_T>*

This method gets the next list item and moves item pointer to the next one

reset up | top

Function

Returns: void

This method resets the iterator

ManagedBuffer up | top

Class

Templates: _T: class

Table of contents

Variables

Operator: ++

Operator: --

Operator: []

Operator: _T*

Function: AddReference

Function: GetBuffer

Function: GetSize

Function: RemoveReference

Function: Resize

Variables

Operator ++ up | top

Operator

Returns: ManagedBuffer<_T> &

Operator -- up | top

Operator

Returns: ManagedBuffer<_T> &

Operator [] up | top

Operator

Returns: _T &

Parameters

index (int)

_T* up | top

Operator

Returns: _T*

AddReference up | top

Function

Returns: void

GetBuffer up | top

Function

Returns: _T *

GetSize up | top

Function

Returns: int

RemoveReference up | top

Function

Returns: void

Resize up | top

Function

Returns: void

Parameters

size (int)

MathException up | top

Class

Inherits: exception

Table of contents

Variables

Function: GetErrorCode

Function: what

Variables

Code (MathExceptions)

GetErrorCode up | top

Function

Returns: MathExceptions

what up | top

Function

Returns: char*

Size2D up | top

Struct

Table of contents

Variables

Variables

Height (int), Width (int)

basic_Matrix2D up | top

Class

Templates: _T: class

Table of contents

Variables

Operator: ()

Operator: *

Operator: *

Operator: *=

Operator: +

Operator: +

Operator: +=

Operator: +=

Operator: -

Operator: -

Operator: -=

Operator: -=

Operator: /

Operator: /=

Operator: =

Operator: ==

Operator: []

Operator: std::string

Function: Adjoint

Function: Average

Function: Cofactor

Function: ColAverage

Function: ColMax

Function: ColMaxIndex

Function: ColMin

Function: ColMinIndex

Function: ColSum

Function: Compare

Function: CopyTo

Function: Determinant

Function: FirstLineCofactor

Function: GaussianElimination

Function: Get

Function: GetCols

Function: GetData

Function: GetRows

Function: GetSize

Function: IdentityMatrix

Function: Inverse

Function: Max

Function: MaxIndex

Function: Min

Function: MinIndex

Function: Minor

Function: Normalize

Function: RemoveCol

Function: RemoveRow

Function: Resize

Function: RobertsCross

Function: RowAverage

Function: RowMax

Function: RowMaxIndex

Function: RowMedian

Function: RowMin

Function: RowMinIndex

Function: RowSum

Function: Set

Function: SetData

Function: SobelX

Function: SobelY

Function: SortRows

Function: Sum

Function: SwapRows

Function: Transpose

Function: isIdentity

Function: isSquare

Variables

Temporary (bool): Whether this matrix is built temporary in this case the matrix is not duplicated, the data is reused

cols (int), data (ManagedBuffer <_T> &), rows (int)

Operator () up | top

Operator

Returns: _T &

Returns the value in the given matrix location specified with row and col parameters. the result of this function is a reference, so a value can be assign to it. eg A(1,2)=5; In the debug mode, this function does bound checking.

Parameters

row (int)

Operator * up | top

Operator

Returns: basic_Matrix2D

Scalar multiplication: Multiplies the matrix by a given constant number. This function also returns the resultant matrix.

Parameters

mult (_T)

Operator * up | top

Operator

Returns: basic_Matrix2D

Multiply the matrix by the given matrix. MatrixException:MatrixExceptions.ME_RowColumnMissMatch The size of resultant matrix is row(of first matrix) by column(of second matrix).

Parameters

mat1 (basic_Matrix2D&)

Operator *= up | top

Operator

Returns: basic_Matrix2D &

Scalar multiplication: Multiplies the matrix by a given constant number.

Parameters

mult (_T)

Operator + up | top

Operator

Returns: basic_Matrix2D

Sums each value, one by one, of the matrix with the given constant number. This function also return the resultant matrix.

Parameters

mult (_T)

Operator + up | top

Operator

Returns: basic_Matrix2D

Adds the given matrix to the current one. MatrixException:MatrixExceptions.ME_MatrixSizeNotEqual This function also returns the resultant matrix.

Parameters

mat1 (basic_Matrix2D&)

Operator += up | top

Operator

Returns: basic_Matrix2D &

Sums each value, one by one, of the matrix with the given constant number.

Parameters

mult (_T)

Operator += up | top

Operator

Returns: basic_Matrix2D &

Adds the given matrix to the current one. MatrixException:MatrixExceptions.ME_MatrixSizeNotEqual

Parameters

mat1 (basic_Matrix2D&)

Operator - up | top

Operator

Returns: basic_Matrix2D

Substracts the given constant number from the each value, one by one, of matrix. This funtion also returns the resultant matrix.

Parameters

mult (_T)

Operator - up | top

Operator

Returns: basic_Matrix2D

Substucts the given matrix from matrix. MatrixException:MatrixExceptions.ME_MatrixSizeNotEqual This function also returns the resultant matrix.

Parameters

mat1 (basic_Matrix2D&)

Operator -= up | top

Operator

Returns: basic_Matrix2D &

Substracts the given constant number from the each value, one by one, of matrix.

Parameters

mult (_T)

Operator -= up | top

Operator

Returns: basic_Matrix2D &

Substucts the given matrix from this matrix. MatrixException:MatrixExceptions.ME_MatrixSizeNotEqual

Parameters

mat1 (basic_Matrix2D&)

Operator / up | top

Operator

Returns: basic_Matrix2D

Scalar division: Divide the matrix with the given constant number. This funtion also returns the resultant matrix.

Parameters

mult (_T)

Operator /= up | top

Operator

Returns: basic_Matrix2D &

Scalar division: Divide the matrix with the given constant number.

Parameters

mult (_T)

Operator = up | top

Operator

Returns: basic_Matrix2D &

Initializes this matrix from the right hand matrix by copying that one

Parameters

matrix (basic_Matrix2D&)

Operator == up | top

Operator

Returns: bool

Checks the given matrix whether is equal to this one.

Parameters

mat (basic_Matrix2D&)

Operator [] up | top

Operator

Returns: _T &

Allows access of a matrix member addressing it by its index.

Parameters

index (int)

std::string up | top

Operator

Returns: std::string

Convert and returns all the data of matrix to a string.

Adjoint up | top

Function

Returns: basic_Matrix2D

Calculates adjoint of this matrix and returns it. MatrixException:MatrixExceptions.ME_MatrixNotSquare

Average up | top

Function

Returns: _T

Returns the average of the matrix values.

Parameters

cols (rows*)

Cofactor up | top

Function

Returns: basic_Matrix2D

Finds the Cofactor value of each elements of matrix. MatrixException:MatrixExceptions.ME_MatrixNotSquare

ColAverage up | top

Function

Returns: _T

Returns average of the given column.

Parameters

col (int)

ColMax up | top

Function

Returns: _T

Find and returns the maximum number in the specified column of matrix.

Parameters

col (int)

ColMaxIndex up | top

Function

Returns: int

Find and returns the index of maximum number in the specified column of matrix.

Parameters

col (int)

ColMin up | top

Function

Returns: _T

Find and returns the minimum number in the specified column of matrix.

Parameters

col (int)

ColMinIndex up | top

Function

Returns: int

Find and returns the index of minimum number in the specified column of matrix.

Parameters

col (int)

ColSum up | top

Function

Returns: _T

Returns sum of the given column.

Parameters

col (int)

Compare up | top

Function

Returns: bool

Checks the given matrix whether is equal to current one.

Parameters

mat (basic_Matrix2D&)

CopyTo up | top

Function

Returns: basic_Matrix2D

Copies the current matrix to another matrix where the location is determined.

Parameters

mat (basic_Matrix2D&), row (int), col (int)

Determinant up | top

Function

Returns: _T

Takes the determinant of matrix. MatrixException:MatrixExceptions.ME_MatrixNotSquare

FirstLineCofactor up | top

Function

Returns: basic_Matrix2D

GaussianElimination up | top

Function

Returns: basic_Matrix2D

Applies Gaussian Jordan Elimination to the matrix.

Get up | top

Function

Returns: _T &

Returns the value in the given matrix location specified with row and col parameters. the result of this function is a reference, so a value can be assign to it. eg A.Get(1,2)=5; In the debug mode, this function does bound checking.

Parameters

row (int)

GetCols up | top

Function

Returns: int

Returns the column number of matrix.

GetData up | top

Function

Returns: _T *

Returns the data array.

GetRows up | top

Function

Returns: int

Returns the row number of matrix.

GetSize up | top

Function

Returns: Size2D

Returns the size of matrix.

IdentityMatrix up | top

Function

Returns: basic_Matrix2D

Creates new identity matrix of given size.

Parameters

size (int)

Inverse up | top

Function

Returns: basic_Matrix2D

Finds and returns inverse of the matrix. MatrixException:MatrixExceptions.ME_MatrixNotSquare The function also returns the resultant matrix.

Max up | top

Function

Returns: _T

Find and returns the maximum number in the matrix.

MaxIndex up | top

Function

Returns: int

Find and returns the index of maximum number in the matrix.

Min up | top

Function

Returns: _T

Find and returns the minimum number in the matrix.

MinIndex up | top

Function

Returns: int

Find and returns the index of minimum number in the matrix.

Minor up | top

Function

Returns: basic_Matrix2D

Finds the Minor value of each elements of matrix. MatrixException:MatrixExceptions.ME_MatrixNotSquare

Normalize up | top

Function

Returns: basic_Matrix2D

Creates a normalized version of this matrix.

RemoveCol up | top

Function

Returns: basic_Matrix2D &

Removes the specified column of the matrix. The function returns the current matrix.

Parameters

Col (int)

RemoveRow up | top

Function

Returns: basic_Matrix2D &

Removes the specified row of the matrix. The function returns the current matrix.

Parameters

Row (int)

Resize up | top

Function

Returns: void

Changes the size of matrix with the given rows and cols parameters. This function preserves all data however the row and column positions might shift.

Parameters

cols (int)

RobertsCross up | top

Function

Returns: basic_Matrix2D

Creates a new Robert's cross filter matrix.

RowAverage up | top

Function

Returns: _T

Returns average of the given row.

Parameters

row (int)

RowMax up | top

Function

Returns: _T

Find and returns the maximum number in the given row of matrix.

Parameters

row (int)

RowMaxIndex up | top

Function

Returns: int

Find and returns the index of maximum number in the given row of matrix.

Parameters

row (int)

RowMedian up | top

Function

Returns: _T

Calculates the median of a given row.

Parameters

row (int)

RowMin up | top

Function

Returns: _T

Find and returns the minimum number in the specified row of matrix.

Parameters

row (int)

RowMinIndex up | top

Function

Returns: int

Find and returns the index of minimum number in the specified row of matrix.

Parameters

row (int)

RowSum up | top

Function

Returns: _T

Returns sum of the given row.

Parameters

row (int)

Set up | top

Function

Returns: void

Assigns the given value to given matrix location

Parameters

row (int), col (int)

SetData up | top

Function

Returns: void

Fills in the matrix with given data. be careful about data type. They should be same as template argument. ie when the type is double, data should be specified as 5.0 The number of arguments given to this function should be the size of the matrix. eg 3x3 matrix should take 9 arguments.

Parameters

value (_T)

SobelX up | top

Function

Returns: basic_Matrix2D

Creates new Sobel filter matrix in X direction.

SobelY up | top

Function

Returns: basic_Matrix2D

Creates new Sobel filter matrix in Y direction.

SortRows up | top

Function

Returns: basic_Matrix2D &

Sorts the rows of the matrix depending on the value of the given column.

Parameters

col (int)

Sum up | top

Function

Returns: _T

Find and returns the sum of all value of the matrix.

SwapRows up | top

Function

Returns: basic_Matrix2D &

Swaps given two rows of the matrix.

Parameters

row1 (int), row2 (int)

Transpose up | top

Function

Returns: basic_Matrix2D

Takes the ranspose of the matrix. MatrixException:MatrixExceptions.ME_MatrixNotSquare The function also returns the resultant matrix.

isIdentity up | top

Function

Returns: bool

Checks whether the matrix is identity matrix. MatrixException:MatrixExceptions.ME_MatrixNotSquare

isSquare up | top

Function

Returns: bool

Checks whether the matrix is square matrix.