Signal/Geometry Processing Library (SPL) 1.1.24 |

Classes | Typedefs | Functions
Two-Dimensional Sequences
Arrays and Sequences

Two-dimensional sequences. More...

## Classes
class | SPL::Sequence2< T >
| A two-dimensional sequence class with lazy copying and reference counting. More...

## Typedefs
typedef Sequence2< double > | SPL::RealSequence2
| Real sequence. More...
typedef Sequence2< int > | SPL::IntSequence2
| Integer sequence. More...

## Functions
template<class T >
std::ostream & | SPL::operator<< (std::ostream &out, const Sequence2< T > &f)
| Output a sequence to a stream. More...
template<class T >
std::istream & | SPL::operator>> (std::istream &in, Sequence2< T > &f)
| Input a sequence from a stream. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator+ (const Sequence2< T > &f, const Sequence2< T > &g)
| Compute the sum of two sequences. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator- (const Sequence2< T > &f, const Sequence2< T > &g)
| Compute the difference of two sequences. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator* (const Sequence2< T > &f, const Sequence2< T > &g)
| Compute the (element-wise) product of two sequences. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator/ (const Sequence2< T > &f, const Sequence2< T > &g)
| Compute the (element-wise) quotient of two sequences. More...
template<class T >
Sequence2< T > | SPL::add (const Sequence2< T > &f, const Sequence2< T > &g)
| Compute the sum of two sequences with potentially differing domains. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator+ (const T &value, const Sequence2< T > &f)
| Add a value to a sequence. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator+ (const Sequence2< T > &f, const T &value)
| Add a value to a sequence. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator- (const Sequence2< T > &f, const T &value)
| Subtract a value from a sequence. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator* (const T &value, const Sequence2< T > &f)
| Compute a scalar multiple of a sequence. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator* (const Sequence2< T > &f, const T &value)
| Compute a scalar multiple of a sequence. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::operator/ (const Sequence2< T > &f, const T &value)
| Divide a sequence by a scalar. More...
template<class T >
bool | SPL::operator== (const Sequence2< T > &f, const Sequence2< T > &g)
| Test two sequences for equality. More...
template<class T >
SPL_SEQUENCE2_INLINE bool | SPL::operator!= (const Sequence2< T > &f, const Sequence2< T > &g)
| Test two sequences for inequality. More...
template<class T >
SPL_SEQUENCE2_INLINE bool | SPL::approxEqual (const Sequence2< T > &f, const Sequence2< T > &g, T threshold=1e-9)
| Test two sequences for approximate equality. More...
template<class T >
Sequence2< T > | SPL::subsequence (const Sequence2< T > &f, int startX, int startY, int width, int height)
| Extract a subsequence from a sequence. More...
template<class T >
SPL_SEQUENCE2_INLINE Sequence2< T > | SPL::translate (const Sequence2< T > &f, int deltaX, int deltaY)
| Translate a sequence by the specified amount. More...
template<class T >
Sequence2< T > | SPL::convolve (const Sequence2< T > &f, const Sequence2< T > &g, int mode)
| Compute the convolution of two sequences. More...
template<class T >
Sequence2< T > | SPL::convolveSeparable (const Sequence2< T > &f, const Sequence1< T > &horzFilt, const Sequence1< T > &vertFilt, int mode=ConvolveMode::full)
| Compute the convolution of a sequence with two 1-D filters (i.e., convolution with a separable filter). More...
template<class T >
Sequence2< T > | SPL::downsample (const Sequence2< T > &f, int factorX, int factorY)
| Downsample a sequence in each of the horizontal and vertical directions by the specified factors. More...
template<class T >
Sequence2< T > | SPL::upsample (const Sequence2< T > &f, int factorX, int factorY)
| Upsample a sequence in each of the horizontal and vertical directions by the specified factors. More...
template<class T >
Sequence2< T > | SPL::upsample (const Sequence2< T > &f, int factorX, int factorY, int padX, int padY)
| Upsample a sequence in each of the horizontal and vertical directions by the specified factors. More...
template<class T >
Array2< Sequence2< T > > | SPL::polyphaseSplit (const Sequence2< T > &seq, int typeX, int numPhasesX, int typeY, int numPhasesY)
| Split a sequence into its polyphase components. More...
template<class T >
Sequence2< T > | SPL::polyphaseJoin (const Array2< Sequence2< T > > &comps, int typeX, int typeY)
| Reassemble a sequence from its polyphase components. More...
| SPL::Sequence2< T >::Sequence2 ()
| The default constructor. More...
| SPL::Sequence2< T >::Sequence2 (int startX, int startY, int width, int height)
| Construct a sequence with the specified start index and size. More...
| SPL::Sequence2< T >::Sequence2 (int startX, int startY, int width, int height, const T &data)
| Construct a sequence with the specified start index and size, with all elements set to the given value. More...
| SPL::Sequence2< T >::Sequence2 (const Sequence2 &f)
| The copy constructor. More...
| SPL::Sequence2< T >::Sequence2 (const Array2< T > &data)
| Create a sequence from an array. More...
| SPL::Sequence2< T >::Sequence2 (int startX, int startY, const Array2< T > &data)
| Create a sequence from an array using the given starting index. More...
| SPL::Sequence2< T >::~Sequence2 ()
| The destructor. More...
Sequence2 & | SPL::Sequence2< T >::operator= (const Sequence2 &f)
| The assignment operator. More...
Sequence2 & | SPL::Sequence2< T >::operator+= (const Sequence2 &f)
| Add another sequence to this one. More...
Sequence2 & | SPL::Sequence2< T >::operator-= (const Sequence2 &f)
| Subtract another sequence from this one. More...
Sequence2 & | SPL::Sequence2< T >::operator*= (const Sequence2 &f)
| Multiply elementwise this sequence by another one. More...
Sequence2 & | SPL::Sequence2< T >::operator/= (const Sequence2 &f)
| Divide elementwise this sequence by another one. More...
Sequence2 & | SPL::Sequence2< T >::operator+= (const T &value)
| Add a value to each element of this sequence. More...
Sequence2 & | SPL::Sequence2< T >::operator-= (const T &value)
| Subtract a value from each element of this sequence. More...
Sequence2 & | SPL::Sequence2< T >::operator*= (const T &value)
| Multiply each element of this sequence by the specified value. More...
Sequence2 & | SPL::Sequence2< T >::operator/= (const T &value)
| Divide each element of the sequence by the given value. More...
int | SPL::Sequence2< T >::getStartX () const
| Get the x-coordinate of the start index for the sequence. More...
int | SPL::Sequence2< T >::getStartY () const
| Get the y-coordinate of the start index for the sequence. More...
int | SPL::Sequence2< T >::getEndX () const
| Get the x-coordinate of the end index for the sequence. More...
int | SPL::Sequence2< T >::getEndY () const
| Get the y-coordinate of the end index for the sequence. More...
int | SPL::Sequence2< T >::getWidth () const
| Get the width of the sequence. More...
int | SPL::Sequence2< T >::getHeight () const
| Get the height of the sequence. More...
int | SPL::Sequence2< T >::getSize () const
| Get the number of elements in the sequence. More...
bool | SPL::Sequence2< T >::isShared () const
| Is the array for this sequence shared with another array? More...
const T & | SPL::Sequence2< T >::operator() (int x, int y) const
| Get a const reference to the specified element in the sequence. More...
T & | SPL::Sequence2< T >::operator() (int x, int y)
| Get a mutable reference to the specified element in the sequence. More...
ConstIterator | SPL::Sequence2< T >::begin () const
| Get a const iterator for the first element in the sequence. More...
Iterator | SPL::Sequence2< T >::begin ()
| Get a mutable iterator for the first element in the sequence. More...
ConstIterator | SPL::Sequence2< T >::end () const
| Get a const iterator for one past the last element in the sequence. More...
Iterator | SPL::Sequence2< T >::end ()
| Get a mutable iterator for one past the last element in the sequence. More...
ConstXIterator | SPL::Sequence2< T >::rowBegin (int y) const
| Get a const iterator for the first element in the specified row of the sequence. More...
XIterator | SPL::Sequence2< T >::rowBegin (int y)
| Get a mutable iterator for the first element in the specified row of the sequence. More...
ConstXIterator | SPL::Sequence2< T >::rowEnd (int y) const
| Get a const iterator for one past the end in the specified row of the sequence. More...
XIterator | SPL::Sequence2< T >::rowEnd (int y)
| Get a mutable iterator for one past the end in the specified row of the sequence. More...
ConstYIterator | SPL::Sequence2< T >::colBegin (int x) const
| Get a const iterator for the first element in the specified column of the sequence. More...
YIterator | SPL::Sequence2< T >::colBegin (int x)
| Get a mutable iterator for the first element in the specified column of the sequence. More...
ConstYIterator | SPL::Sequence2< T >::colEnd (int x) const
| Get a const iterator for one past the end in the specified column of the sequence. More...
YIterator | SPL::Sequence2< T >::colEnd (int x)
| Get a mutable iterator for one past the end in the specified column of the sequence. More...
T | SPL::Sequence2< T >::min () const
| Get the minimum element in the sequence. More...
T | SPL::Sequence2< T >::max () const
| Get the maximum element in the sequence. More...
T | SPL::Sequence2< T >::sum () const
| Get the sum of the elements in the sequence. More...
std::ostream & | SPL::Sequence2< T >::output (std::ostream &out, int fieldWidth) const
| Output a sequence to the specified stream using the given field width for each sequence element. More...
void | SPL::Sequence2< T >::fill (const T &value)
| Get a copy of the underlying array. More...
void | SPL::Sequence2< T >::swapArray (Array2< T > &data)
| Swap the data for the underlying array and the specified array. More...
Array2< T > | SPL::Sequence2< T >::getArray () const
| Get a copy of the underlying array. More...
Sequence2 & | SPL::Sequence2< T >::translate (int x, int y)
| Translate (i.e., shift) a sequence by the specified displacement. More...

## Detailed Description

Two-dimensional sequences.

## Typedef Documentation

typedef Sequence2<int> SPL::IntSequence2

Integer sequence.

typedef Sequence2<double> SPL::RealSequence2

Real sequence.

## Function Documentation

template<class T >

Sequence2<T> SPL::add | ( | const Sequence2< T > & | f,
|  | const Sequence2< T > & | g
| ) |  |

Compute the sum of two sequences with potentially differing domains.

Effects: The sum of the sequences f and g is computed. The domain of the sum is taken to be the smallest domain that contains the domains of both of the sequences being summed.

Returns: The sum is returned.

template<class T >

SPL_SEQUENCE2_INLINE bool SPL::approxEqual | ( | const Sequence2< T > & | f,
|  | const Sequence2< T > & | g,
|  | T | threshold = `1e-9`
| ) |  |

Test two sequences for approximate equality.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::ConstIterator SPL::Sequence2< T >::begin | ( |  | ) | const

Get a const iterator for the first element in the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::Iterator SPL::Sequence2< T >::begin | ( |  | ) |

Get a mutable iterator for the first element in the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::ConstYIterator SPL::Sequence2< T >::colBegin | ( | int | x | ) | const

Get a const iterator for the first element in the specified column of the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::YIterator SPL::Sequence2< T >::colBegin | ( | int | x | ) |

Get a mutable iterator for the first element in the specified column of the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::ConstYIterator SPL::Sequence2< T >::colEnd | ( | int | x | ) | const

Get a const iterator for one past the end in the specified column of the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::YIterator SPL::Sequence2< T >::colEnd | ( | int | x | ) |

Get a mutable iterator for one past the end in the specified column of the sequence.

template<class T >

Sequence2<T> SPL::convolve | ( | const Sequence2< T > & | f,
|  | const Sequence2< T > & | g,
|  | int | mode
| ) |  |

Compute the convolution of two sequences.

template<class T >

Sequence2<T> SPL::convolveSeparable | ( | const Sequence2< T > & | f,
|  | const Sequence1< T > & | horzFilt,
|  | const Sequence1< T > & | vertFilt,
|  | int | mode = `ConvolveMode::full`
| ) |  |

Compute the convolution of a sequence with two 1-D filters (i.e., convolution with a separable filter).

template<class T >

Sequence2<T> SPL::downsample | ( | const Sequence2< T > & | f,
|  | int | factorX,
|  | int | factorY
| ) |  |

Downsample a sequence in each of the horizontal and vertical directions by the specified factors.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::ConstIterator SPL::Sequence2< T >::end | ( |  | ) | const

Get a const iterator for one past the last element in the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::Iterator SPL::Sequence2< T >::end | ( |  | ) |

Get a mutable iterator for one past the last element in the sequence.

template<class T >

SPL_SEQUENCE2_INLINE void SPL::Sequence2< T >::fill | ( | const T & | value | ) |

Get a copy of the underlying array.

template<class T >

SPL_SEQUENCE2_INLINE Array2< T > SPL::Sequence2< T >::getArray | ( |  | ) | const

Get a copy of the underlying array.

template<class T >

SPL_SEQUENCE2_INLINE int SPL::Sequence2< T >::getEndX | ( |  | ) | const

Get the x-coordinate of the end index for the sequence.

template<class T >

SPL_SEQUENCE2_INLINE int SPL::Sequence2< T >::getEndY | ( |  | ) | const

Get the y-coordinate of the end index for the sequence.

template<class T >

SPL_SEQUENCE2_INLINE int SPL::Sequence2< T >::getHeight | ( |  | ) | const

Get the height of the sequence.

template<class T >

SPL_SEQUENCE2_INLINE int SPL::Sequence2< T >::getSize | ( |  | ) | const

Get the number of elements in the sequence.

template<class T >

SPL_SEQUENCE2_INLINE int SPL::Sequence2< T >::getStartX | ( |  | ) | const

Get the x-coordinate of the start index for the sequence.

template<class T >

SPL_SEQUENCE2_INLINE int SPL::Sequence2< T >::getStartY | ( |  | ) | const

Get the y-coordinate of the start index for the sequence.

template<class T >

SPL_SEQUENCE2_INLINE int SPL::Sequence2< T >::getWidth | ( |  | ) | const

Get the width of the sequence.

template<class T >

SPL_SEQUENCE2_INLINE bool SPL::Sequence2< T >::isShared | ( |  | ) | const

Is the array for this sequence shared with another array?

template<class T >

SPL_SEQUENCE2_INLINE T SPL::Sequence2< T >::max | ( |  | ) | const

Get the maximum element in the sequence.

The sequence must contain at least one element.

template<class T >

SPL_SEQUENCE2_INLINE T SPL::Sequence2< T >::min | ( |  | ) | const

Get the minimum element in the sequence.

The sequence must contain at least one element.

template<class T >

SPL_SEQUENCE2_INLINE bool SPL::operator!= | ( | const Sequence2< T > & | f,
|  | const Sequence2< T > & | g
| ) |  |

Test two sequences for inequality.

template<class T >

SPL_SEQUENCE2_INLINE T & SPL::Sequence2< T >::operator() | ( | int | x,
|  | int | y
| ) |  |

Get a mutable reference to the specified element in the sequence.

template<class T >

SPL_SEQUENCE2_INLINE const T & SPL::Sequence2< T >::operator() | ( | int | x,
|  | int | y
| ) |  | const

Get a const reference to the specified element in the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator* | ( | const Sequence2< T > & | f,
|  | const Sequence2< T > & | g
| ) |  |

Compute the (element-wise) product of two sequences.

Returns: The element-wise product of the sequences f and g is returned. Both sequences must have the same domain.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator* | ( | const T & | value,
|  | const Sequence2< T > & | f
| ) |  |

Compute a scalar multiple of a sequence.

Returns: The sequence f multiplied by the value a is returned.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator* | ( | const Sequence2< T > & | f,
|  | const T & | value
| ) |  |

Compute a scalar multiple of a sequence.

Returns: The sequence f multiplied by the value a is returned.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::operator*= | ( | const Sequence2< T > & | f | ) |

Multiply elementwise this sequence by another one.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::operator*= | ( | const T & | value | ) |

Multiply each element of this sequence by the specified value.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator+ | ( | const Sequence2< T > & | f,
|  | const Sequence2< T > & | g
| ) |  |

Compute the sum of two sequences.

Returns: The sum of the sequences f and g is returned. Both sequences must have the same domain.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator+ | ( | const T & | value,
|  | const Sequence2< T > & | f
| ) |  |

Add a value to a sequence.

Returns: The sequence f with a added to each of its elements is returned.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator+ | ( | const Sequence2< T > & | f,
|  | const T & | value
| ) |  |

Add a value to a sequence.

Returns: The sequence f with a added to each of its elements is returned.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::operator+= | ( | const Sequence2< T > & | f | ) |

Add another sequence to this one.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::operator+= | ( | const T & | value | ) |

Add a value to each element of this sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator- | ( | const Sequence2< T > & | f,
|  | const Sequence2< T > & | g
| ) |  |

Compute the difference of two sequences.

Returns: The difference between the sequence f and sequence g (i.e., f - g) is returned. Both sequences must have the same domain.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator- | ( | const Sequence2< T > & | f,
|  | const T & | value
| ) |  |

Subtract a value from a sequence.

Returns: The sequence f with a subtracted from each of its elements is returned.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::operator-= | ( | const Sequence2< T > & | f | ) |

Subtract another sequence from this one.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::operator-= | ( | const T & | value | ) |

Subtract a value from each element of this sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator/ | ( | const Sequence2< T > & | f,
|  | const Sequence2< T > & | g
| ) |  |

Compute the (element-wise) quotient of two sequences.

Returns: The element-wise quotient of the sequences f and g is returned. Both sequences must have the same domain.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::operator/ | ( | const Sequence2< T > & | f,
|  | const T & | value
| ) |  |

Divide a sequence by a scalar.

Returns: The sequence f divided by the value a is returned.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::operator/= | ( | const Sequence2< T > & | f | ) |

Divide elementwise this sequence by another one.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::operator/= | ( | const T & | value | ) |

Divide each element of the sequence by the given value.

template<class T >

std::ostream& SPL::operator<< | ( | std::ostream & | out,
|  | const Sequence2< T > & | f
| ) |  |

Output a sequence to a stream.

Effects: The sequence f is written to the output stream out. The output consists of the following information in order: 1) the x-coordinate of the start index of the sequence 2) the y-coordinate of the start index of the sequence 3) the width of the sequence 4) the height of the sequence 5) the elements of the sequence in row-major order

Returns: A reference to the stream out is returned.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::operator= | ( | const Sequence2< T > & | f | ) |

The assignment operator.

template<class T >

bool SPL::operator== | ( | const Sequence2< T > & | f,
|  | const Sequence2< T > & | g
| ) |  |

Test two sequences for equality.

In order for two sequences to be deemed equal, they must be defined on the same domain and have their element values match everywhere in this domain.

template<class T >

std::istream& SPL::operator>> | ( | std::istream & | in,
|  | Sequence2< T > & | f
| ) |  |

Input a sequence from a stream.

Effects: The sequence f is read from the input stream in. The data is read in a format consistent with that used by operator<<.

Returns: A reference to the stream in is returned.

template<class T >

std::ostream & SPL::Sequence2< T >::output | ( | std::ostream & | out,
|  | int | fieldWidth
| ) |  | const

Output a sequence to the specified stream using the given field width for each sequence element.

template<class T >

Sequence2<T> SPL::polyphaseJoin | ( | const Array2< Sequence2< T > > & | comps,
|  | int | typeX,
|  | int | typeY
| ) |  |

Reassemble a sequence from its polyphase components.

Effects: A sequence is recomposed from its polyphase components comps. A polyphase decomposition of type type is assumed.

Returns: The recomposed sequence is returned.

template<class T >

Array2<Sequence2<T> > SPL::polyphaseSplit | ( | const Sequence2< T > & | seq,
|  | int | typeX,
|  | int | numPhasesX,
|  | int | typeY,
|  | int | numPhasesY
| ) |  |

Split a sequence into its polyphase components.

Effects: The polyphase decomposition of the sequence seq is computed. In particular, the polyphase decomposition with numPhase phases and type type is computed.

Returns: An array containing the polyphase components is returned.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::ConstXIterator SPL::Sequence2< T >::rowBegin | ( | int | y | ) | const

Get a const iterator for the first element in the specified row of the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::XIterator SPL::Sequence2< T >::rowBegin | ( | int | y | ) |

Get a mutable iterator for the first element in the specified row of the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::ConstXIterator SPL::Sequence2< T >::rowEnd | ( | int | y | ) | const

Get a const iterator for one past the end in the specified row of the sequence.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T >::XIterator SPL::Sequence2< T >::rowEnd | ( | int | y | ) |

Get a mutable iterator for one past the end in the specified row of the sequence.

template<class T >

SPL_SEQUENCE2_INLINE SPL::Sequence2< T >::Sequence2 | ( |  | ) |

The default constructor.

template<class T >

SPL_SEQUENCE2_INLINE SPL::Sequence2< T >::Sequence2 | ( | int | startX,
|  | int | startY,
|  | int | width,
|  | int | height
| ) |  |

Construct a sequence with the specified start index and size.

template<class T >

SPL_SEQUENCE2_INLINE SPL::Sequence2< T >::Sequence2 | ( | int | startX,
|  | int | startY,
|  | int | width,
|  | int | height,
|  | const T & | data
| ) |  |

Construct a sequence with the specified start index and size, with all elements set to the given value.

template<class T >

SPL_SEQUENCE2_INLINE SPL::Sequence2< T >::Sequence2 | ( | const Sequence2< T > & | f | ) |

The copy constructor.

template<class T >

SPL_SEQUENCE2_INLINE SPL::Sequence2< T >::Sequence2 | ( | const Array2< T > & | data | ) |

Create a sequence from an array.

template<class T >

SPL_SEQUENCE2_INLINE SPL::Sequence2< T >::Sequence2 | ( | int | startX,
|  | int | startY,
|  | const Array2< T > & | data
| ) |  |

Create a sequence from an array using the given starting index.

template<class T >

Sequence2<T> SPL::subsequence | ( | const Sequence2< T > & | f,
|  | int | startX,
|  | int | startY,
|  | int | width,
|  | int | height
| ) |  |

Extract a subsequence from a sequence.

Effects: The subsequence with start index startInd and size size is extracted from the sequence f.

Returns: The extracted subsequence is returned.

template<class T >

SPL_SEQUENCE2_INLINE T SPL::Sequence2< T >::sum | ( |  | ) | const

Get the sum of the elements in the sequence.

template<class T >

SPL_SEQUENCE2_INLINE void SPL::Sequence2< T >::swapArray | ( | Array2< T > & | data | ) |

Swap the data for the underlying array and the specified array.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2< T > & SPL::Sequence2< T >::translate | ( | int | x,
|  | int | y
| ) |  |

Translate (i.e., shift) a sequence by the specified displacement.

template<class T >

SPL_SEQUENCE2_INLINE Sequence2<T> SPL::translate | ( | const Sequence2< T > & | f,
|  | int | deltaX,
|  | int | deltaY
| ) |  |

Translate a sequence by the specified amount.

Effects: The sequence f is translated by (deltaX, deltaY).

Returns: The translated sequence is returned.

template<class T >

Sequence2<T> SPL::upsample | ( | const Sequence2< T > & | f,
|  | int | factorX,
|  | int | factorY
| ) |  |

Upsample a sequence in each of the horizontal and vertical directions by the specified factors.

The following condition should always be true: downsample(upsample(f, factorX, factorY), factorX, factorY) == f.

template<class T >

Sequence2<T> SPL::upsample | ( | const Sequence2< T > & | f,
|  | int | factorX,
|  | int | factorY,
|  | int | padX,
|  | int | padY
| ) |  |

Upsample a sequence in each of the horizontal and vertical directions by the specified factors.

The following condition should always be true: downsample(upsample(f, factorX, factorY), factorX, factorY) == f.

template<class T >

SPL_SEQUENCE2_INLINE SPL::Sequence2< T >::~Sequence2 | ( |  | ) |

The destructor.