Wavelet and Image class library  1.3.2
Public Member Functions | Private Member Functions | Private Attributes
MirrorPosition Class Reference

#include <MirrorPosition.hh>

Inheritance diagram for MirrorPosition:
Inheritance graph
[legend]
Collaboration diagram for MirrorPosition:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MirrorPosition (bool laxis=false, bool raxis=false)
 MirrorPosition (int newsize)
int pos (int position, int start, int end, int &sign)
void setlaxis (bool laxis)
void setraxis (bool raxis)
bool laxis (void)
bool raxis (void)

Private Member Functions

int noaxis (int position, int start, int length, int &sign)
int twoaxis (int position, int start, int length, int &sign)
int oneleftaxis (int position, int start, int length, int &sign)
int onerightaxis (int position, int start, int length, int &sign)

Private Attributes

bool m_leftaxis
bool m_rightaxis

Detailed Description

A Mirror index (abstract). Performs symmetric, periodic and whatever extensions to a vector or a part of it.

Definition at line 23 of file MirrorPosition.hh.


Constructor & Destructor Documentation

MirrorPosition::MirrorPosition ( bool  laxis = false,
bool  raxis = false 
)

Constructor. Allows to specify nonstandard symmetry details.

Parameters:
laxisan additional mirroring axis is used on the left side, like 3-2-1-0-|-0-1-2-3
raxisan additional mirroring axis is used on the right side, like 3-2-1-0-|-0-1-2-3
MirrorPosition::MirrorPosition ( int  newsize) [inline]

Constructor. Calls the superclass' constructor.

Definition at line 37 of file MirrorPosition.hh.

References m_leftaxis, and m_rightaxis.


Member Function Documentation

bool MirrorPosition::laxis ( void  ) [inline]

Return the left side axis settings.

Returns:
if an invisible axis exists: {true} else {false}

Definition at line 71 of file MirrorPosition.hh.

References m_leftaxis.

Referenced by setlaxis().

int MirrorPosition::noaxis ( int  position,
int  start,
int  length,
int &  sign 
) [private]

Mirroring with the outer elements as axis on both sides.

Parameters:
positionthe requested position
startthe assumed start
lengththe assumed length
sign-1 if {m_symmetry} is set and we're in the first half of a period, else 1
Returns:
the new position
int MirrorPosition::oneleftaxis ( int  position,
int  start,
int  length,
int &  sign 
) [private]

Mirroring with invisible axis on the left, but none on the right side.

Parameters:
positionthe requested position
startthe assumed start
lengththe assumed length
sign-1 if {m_symmetry} is set and we're in the first half of a period, else 1
Returns:
the new position
int MirrorPosition::onerightaxis ( int  position,
int  start,
int  length,
int &  sign 
) [private]

Mirroring with invisible axis on the right, but none on the left side.

Parameters:
positionthe requested position
startthe assumed start
lengththe assumed length
sign-1 if {m_symmetry} is set and we're in the first half of a period, else 1
Returns:
the new position
int MirrorPosition::pos ( int  position,
int  start,
int  end,
int &  sign 
) [virtual]

Calculate real position assuming a given vector start and length. If a position is greater than the assumed size or less than the assumed start position we mirror the position back into range.

Parameters:
positionthe requested position
startthe assumed start
endthe assumed end point
sign-1 if {symmetry} is set and we're in the first half of a period, else 1
Returns:
the new position

Implements VectorPosition.

bool MirrorPosition::raxis ( void  ) [inline]

Return the right side axis settings.

Returns:
if an invisible axis exists: {true} else {false}

Definition at line 75 of file MirrorPosition.hh.

References m_rightaxis.

Referenced by setraxis().

void MirrorPosition::setlaxis ( bool  laxis) [inline]

Set left mirroring axis.

Parameters:
laxisan additional mirroring axis is used on the left side, like 3-2-1-0-|-0-1-2-3

Definition at line 60 of file MirrorPosition.hh.

References laxis(), and m_leftaxis.

void MirrorPosition::setraxis ( bool  raxis) [inline]

Set right mirroring axis.

Parameters:
raxisan additional mirroring axis is used on the reft side, like 0-1-2-3-|-3-2-1-0

Definition at line 66 of file MirrorPosition.hh.

References m_rightaxis, and raxis().

int MirrorPosition::twoaxis ( int  position,
int  start,
int  length,
int &  sign 
) [private]

Mirroring with invisible axis on both sides.

Parameters:
positionthe requested position
startthe assumed start
lengththe assumed length
sign-1 if {m_symmetry} is set and we're in the first half of a period, else 1
Returns:
the new position

Member Data Documentation

Invisible left axis for mirroring?

Definition at line 79 of file MirrorPosition.hh.

Referenced by laxis(), MirrorPosition(), and setlaxis().

Invisible right axis for mirroring?

Definition at line 81 of file MirrorPosition.hh.

Referenced by MirrorPosition(), raxis(), and setraxis().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines