Main Page | Modules | Alphabetical List | Compound List | File List | Compound Members | Related Pages

tapeChunk< T > Class Template Reference
[NonHaltDetectionDataStructures]

representation of an arbitrary size local tape configuration. More...

#include <non_halt_data_structures.hpp>

List of all members.

Public Member Functions

 tapeChunk ()
 default constructor.

 tapeChunk (const tapeChunk< T > &tape)
 copy constructor.

 tapeChunk (infinite_tape< T > &tape, typename std::list< T >::iterator start, typename std::list< T >::iterator end)
 creates a local tape representing the cells from start to end on tape.

 tapeChunk (tapeChunk< T > &tape, int start, int end)
 creates a local tape representing the cells from start to end on tape.

void fillTape (infinite_tape< T > &tape, typename std::list< T >::iterator start, typename std::list< T >::iterator end)
 fills the tape with the local tape configuration on tape from start to end

void fillTape (const tapeChunk< T > &tape, int start, int end)
 fills the tape with the local tape configuration representing the cells from start to end on tape.

void emptyTape ()
 empties the tape.

bool compareNextChunk (const tapeChunk< T > &tape, int &start)
 compare the elements in tape with the elements in *this starting with cell start

bool isEmpty ()
 is the tape empty?

int length ()
 length of the tape.

void print ()
 prints the tape.

tapeChunk< T > operator+ (const tapeChunk< T > &rhs)
 concatenates two tapeChunks together

bool operator== (const tapeChunk< T > &rhs)
 equality operator

bool operator!= (const tapeChunk< T > &rhs)
 inequality operator


Public Attributes

std::vector< T > tapeConfig


Detailed Description

template<typename T>
class tapeChunk< T >

representation of an arbitrary size local tape configuration.

Definition at line 439 of file non_halt_data_structures.hpp.


Constructor & Destructor Documentation

template<typename T>
tapeChunk< T >::tapeChunk  )  [inline]
 

default constructor.

Author:
Owen Kellett

Definition at line 446 of file non_halt_data_structures.hpp.

template<typename T>
tapeChunk< T >::tapeChunk const tapeChunk< T > &  tape  )  [inline]
 

copy constructor.

Parameters:
tape tape chunk to be copied
Author:
Owen Kellett

Definition at line 454 of file non_halt_data_structures.hpp.

References tapeChunk< T >::tapeConfig.

template<typename T>
tapeChunk< T >::tapeChunk infinite_tape< T > &  tape,
typename std::list< T >::iterator  start,
typename std::list< T >::iterator  end
[inline]
 

creates a local tape representing the cells from start to end on tape.

Precondition:
tape is a valid infinite_tape and start and end point to cells on tape
Postcondition:
*this is a local tape representing the cells from start to end on tape
Parameters:
tape the tape to derive the local tape configuration from
start the left edge of the tape chunk
end the right edge of the tape chunk
Author:
Owen Kellett

Definition at line 469 of file non_halt_data_structures.hpp.

template<typename T>
tapeChunk< T >::tapeChunk tapeChunk< T > &  tape,
int  start,
int  end
[inline]
 

creates a local tape representing the cells from start to end on tape.

Precondition:
tape is a valid tapeChunk and start and end are locations within the range of tape's limits
Postcondition:
*this is a local tape representing the cells from start to end on tape
Parameters:
tape the tape to derive the local tape configuration from
start the left edge of the tape chunk
end the right edge of the tape chunk
Author:
Owen Kellett

Definition at line 485 of file non_halt_data_structures.hpp.

References tapeChunk< T >::tapeConfig.


Member Function Documentation

template<typename T>
bool tapeChunk< T >::compareNextChunk const tapeChunk< T > &  tape,
int &  start
[inline]
 

compare the elements in tape with the elements in *this starting with cell start

Returns:
if the every element on tape matches the corresponding sequence of elements on *this starting with cell start, return true else false
Author:
Owen Kellett

Definition at line 540 of file non_halt_data_structures.hpp.

References tapeChunk< T >::tapeConfig.

Referenced by checkFinalCounterGrammar().

template<typename T>
void tapeChunk< T >::emptyTape  )  [inline]
 

empties the tape.

Postcondition:
*this is a zero length tapeChunk
Author:
Owen Kellett

Definition at line 529 of file non_halt_data_structures.hpp.

Referenced by checkCounterRun(), and extractCounterElements().

template<typename T>
void tapeChunk< T >::fillTape const tapeChunk< T > &  tape,
int  start,
int  end
[inline]
 

fills the tape with the local tape configuration representing the cells from start to end on tape.

Precondition:
tape is a valid tapeChunk and start and end are locations within the range of tape's limits
Postcondition:
*this is a local tape representing the cells from start to end on tape
Parameters:
tape the tape to derive the local tape configuration from
start the left edge of the tape chunk
end the right edge of the tape chunk
Author:
Owen Kellett

Definition at line 517 of file non_halt_data_structures.hpp.

References tapeChunk< T >::tapeConfig.

template<typename T>
void tapeChunk< T >::fillTape infinite_tape< T > &  tape,
typename std::list< T >::iterator  start,
typename std::list< T >::iterator  end
[inline]
 

fills the tape with the local tape configuration on tape from start to end

Precondition:
tape is a valid infinite_tape and start and end point to cells on tape
Postcondition:
*this is a local tape representing the cells from start to end on tape
Parameters:
tape the tape to derive the local tape configuration from
start the left edge of the tape chunk
end the right edge of the tape chunk
Author:
Owen Kellett

Definition at line 501 of file non_halt_data_structures.hpp.

Referenced by checkCounterConversion(), checkCounterRun(), checkLeaningChristmasTree(), checkLeaningChristmasTreeGrammar(), checkMultiSweepChristmasTree(), checkMultiSweepFirstPass(), checkMultiSweepSecondPass(), extractCounterElements(), findMidSection(), getNextChunk(), getNextChunkUnevenCheck(), tapeChunk< T >::operator+(), and testCounter().

template<typename T>
bool tapeChunk< T >::isEmpty  )  [inline]
 

is the tape empty?

Returns:
true iff the tape is empty
Author:
Owen Kellett

Definition at line 556 of file non_halt_data_structures.hpp.

Referenced by checkLeaningChristmasTreeGrammar(), checkMultiSweepFirstPass(), and checkMultiSweepSecondPass().

template<typename T>
int tapeChunk< T >::length  )  [inline]
 

length of the tape.

Returns:
number of cells in *this
Author:
Owen Kellett

Definition at line 566 of file non_halt_data_structures.hpp.

Referenced by checkCounterRun(), checkFinalCounterGrammar(), and extractCounterElements().

template<typename T>
bool tapeChunk< T >::operator!= const tapeChunk< T > &  rhs  )  [inline]
 

inequality operator

Returns:
true iff tapes are not identical
Author:
Owen Kellett

Definition at line 614 of file non_halt_data_structures.hpp.

References tapeChunk< T >::tapeConfig.

template<typename T>
tapeChunk<T> tapeChunk< T >::operator+ const tapeChunk< T > &  rhs  )  [inline]
 

concatenates two tapeChunks together

Author:
Owen Kellett

Definition at line 586 of file non_halt_data_structures.hpp.

References tapeChunk< T >::fillTape(), and tapeChunk< T >::tapeConfig.

template<typename T>
bool tapeChunk< T >::operator== const tapeChunk< T > &  rhs  )  [inline]
 

equality operator

Returns:
true iff tapes are identical
Author:
Owen Kellett

Definition at line 599 of file non_halt_data_structures.hpp.

References tapeChunk< T >::tapeConfig.

template<typename T>
void tapeChunk< T >::print  )  [inline]
 

prints the tape.

Author:
Owen Kellett

Definition at line 575 of file non_halt_data_structures.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Nov 20 00:17:33 2003 for BusyBeaver by doxygen 1.3.3