11.07.2014 Views

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

APPENDIX B. PROGRAM LISTINGS 298<br />

position.<br />

Parameters:<br />

v: the Vector to be updated.<br />

object: a pointer to the data structure to be set.<br />

index: the position <strong>of</strong> the pointer to be altered (head is index<br />

0).<br />

NOTE: no bounds checking is performed.<br />

*/<br />

void popFront(Vector v);<br />

/*<br />

Removes the Node at the head <strong>of</strong> the Vector (index 0).<br />

If Vector is empty, nothing is done.<br />

All pointers in the Vector are shifted left by index -1.<br />

Parameters:<br />

v: the Vector to be updated.<br />

*/<br />

void popBack(Vector v);<br />

/*<br />

Removes the Node at the tail <strong>of</strong> the Vector.<br />

If Vector is empty, nothing is done.<br />

Parameters:<br />

v: the Vector to be updated.<br />

*/<br />

void* elementAt(Vector v, int index);<br />

/*<br />

Returns the data structure pointer within the given vector at the<br />

given index.<br />

Parameters:<br />

v: the Vector to retrieve from.<br />

index: the position <strong>of</strong> the pointer requested (head is index 0).<br />

Returns:<br />

The stored void* pointer within the Vector.<br />

NOTE: no bounds checking is performed.<br />

*/<br />

int sizeVector(Vector v);<br />

/*<br />

Returns the current number <strong>of</strong> data structure pointers stored within<br />

the given Vector.<br />

Parameters:<br />

v: the given Vector.<br />

Returns:<br />

The number <strong>of</strong> stored elements.<br />

*/<br />

#endif

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!