|
tilde~
Puredata Qt-based GUI
|
#include <ceammc_atomlist.h>
Public Types | |
| enum | NonEqualLengthBehaivor { MINSIZE = 0, PADZERO, CLIP, WRAP, FOLD } |
Public Member Functions | |
| AtomList () | |
| AtomList (const Atom &a) | |
| AtomList (const Atom &a, const Atom &b) | |
| AtomList (size_t n, t_atom *lst) | |
| AtomList (int n, t_atom *lst) | |
| size_t | size () const |
| bool | empty () const |
| Atom & | at (size_t pos) |
| returns reference to element at specified position More... | |
| const Atom & | at (size_t pos) const |
| Atom & | operator[] (size_t pos) |
| const Atom & | operator[] (size_t pos) const |
| Atom * | relativeAt (int pos) |
| const Atom * | relativeAt (int pos) const |
| Atom * | clipAt (int pos) |
| const Atom * | clipAt (int pos) const |
| Atom * | wrapAt (int pos) |
| const Atom * | wrapAt (int pos) const |
| Atom * | foldAt (int pos) |
| const Atom * | foldAt (int pos) const |
| void | resizePad (size_t n, const Atom &v) |
| void | resizeClip (size_t n) |
| void | resizeWrap (size_t n) |
| void | resizeFold (size_t n) |
| bool | property (const std::string &name, Atom *dest) const |
| std::deque< AtomList > | properties () const |
| bool | hasProperty (const std::string &name) const |
| AtomList | slice (int start) const |
| AtomList | slice (int start, int end, size_t step=1) const |
| void | fromPdData (size_t n, t_atom *lst) |
| void | fromPdData (int n, t_atom *lst) |
| t_atom * | toPdData () const |
| void | append (const Atom &a) |
| void | append (const AtomList &l) |
| bool | insert (size_t pos, const Atom &a) |
| bool | insert (size_t pos, const AtomList &l) |
| bool | remove (size_t pos) |
| void | removeAll (const Atom &a) |
| void | removeAll (AtomPredicate pred) |
| void | replaceAll (const Atom &old_value, const Atom &new_value) |
| void | replaceAll (AtomPredicate pred, const Atom &new_value) |
| void | clear () |
| void | fill (const Atom &a) |
| void | fill (const Atom &a, size_t sz) |
| Atom * | first () |
| Atom * | last () |
| const Atom * | first () const |
| const Atom * | last () const |
| void | sort () |
| void | shuffle () |
| void | reverse () |
| AtomList | subList (int begin, int end) |
| AtomList | filtered (AtomPredicate pred) const |
| const Atom * | min () const |
| const Atom * | max () const |
| bool | range (Atom &min, Atom &max) const |
| const Atom * | find (const Atom &a) const |
| const Atom * | find (AtomPredicate pred) const |
| const Atom * | findLast (const Atom &a) const |
| const Atom * | findLast (AtomPredicate pred) const |
| Atom * | min () |
| Atom * | max () |
| Atom * | find (const Atom &a) |
| Atom * | find (AtomPredicate pred) |
| Atom * | findLast (const Atom &a) |
| Atom * | findLast (AtomPredicate pred) |
| float | sum () const |
| float | product () const |
| bool | contains (const Atom &a) const |
| int | findPos (const Atom &a) const |
| int | findPos (AtomPredicate pred) const |
| size_t | count (const Atom &a) const |
| size_t | count (AtomPredicate pred) const |
| bool | allOff (AtomPredicate pred) const |
| bool | anyOff (AtomPredicate pred) const |
| bool | noneOff (AtomPredicate pred) const |
| FloatList | asFloats () const |
| size_t | asSizeT (size_t defaultValue=0) const |
| void | outputAtoms (t_outlet *x) const |
| output list atoms separatly, one by one More... | |
| void | output (t_outlet *x) const |
| void | outputAsAny (t_outlet *x) const |
| void | outputAsAny (t_outlet *x, t_symbol *s) const |
| template<typename T > | |
| T | reduce (T init, T(*fn)(const Atom &, const Atom &)) const |
| t_float | reduceFloat (t_float init, t_float def, t_float(*fn)(t_float, t_float)) const |
| bool | normalizeFloats () |
| AtomList & | operator+= (double v) |
| AtomList & | operator-= (double v) |
| AtomList & | operator*= (double v) |
| AtomList & | operator/= (double v) |
| AtomList | operator+ (double v) const |
| AtomList | operator- (double v) const |
| AtomList | operator* (double v) const |
| AtomList | operator/ (double v) const |
Static Public Member Functions | |
| static AtomList | zeroes (size_t n) |
| static AtomList | ones (size_t n) |
| static AtomList | filled (const Atom &a, size_t n) |
| static AtomList | values (size_t n,...) |
| static AtomList | add (const AtomList &a, const AtomList &b, NonEqualLengthBehaivor lb=MINSIZE) |
| returns new list that is a sum of original list values and new list ("l") values More... | |
| static AtomList | sub (const AtomList &a, const AtomList &b, NonEqualLengthBehaivor lb=MINSIZE) |
| returns new list that contains difference from given lists More... | |
Friends | |
| bool | operator== (const AtomList &l1, const AtomList &l2) |
| bool | operator!= (const AtomList &l1, const AtomList &l2) |
| ceammc::AtomList::AtomList | ( | ) |
| ceammc::AtomList::AtomList | ( | const Atom & | a | ) |
| ceammc::AtomList::AtomList | ( | size_t | n, |
| t_atom * | lst | ||
| ) |
|
explicit |
|
static |
returns new list that is a sum of original list values and new list ("l") values
| l | - list |
| b | - behaivor flag, when lists are different lengths |
| bool ceammc::AtomList::allOff | ( | AtomPredicate | pred | ) | const |
| bool ceammc::AtomList::anyOff | ( | AtomPredicate | pred | ) | const |
| void ceammc::AtomList::append | ( | const Atom & | a | ) |
| void ceammc::AtomList::append | ( | const AtomList & | l | ) |
| FloatList ceammc::AtomList::asFloats | ( | ) | const |
| size_t ceammc::AtomList::asSizeT | ( | size_t | defaultValue = 0 | ) | const |
| Atom& ceammc::AtomList::at | ( | size_t | pos | ) |
returns reference to element at specified position
| pos | - position (starting from 0) |
| exception | if invalid position given |
| const Atom& ceammc::AtomList::at | ( | size_t | pos | ) | const |
| void ceammc::AtomList::clear | ( | ) |
| Atom* ceammc::AtomList::clipAt | ( | int | pos | ) |
Same as at(), but values for index greater than the size of the List will be clipped to the last index.
| pos | - position index |
| const Atom* ceammc::AtomList::clipAt | ( | int | pos | ) | const |
| bool ceammc::AtomList::contains | ( | const Atom & | a | ) | const |
| size_t ceammc::AtomList::count | ( | const Atom & | a | ) | const |
| size_t ceammc::AtomList::count | ( | AtomPredicate | pred | ) | const |
| bool ceammc::AtomList::empty | ( | ) | const |
| void ceammc::AtomList::fill | ( | const Atom & | a | ) |
| void ceammc::AtomList::fill | ( | const Atom & | a, |
| size_t | sz | ||
| ) |
| AtomList ceammc::AtomList::filtered | ( | AtomPredicate | pred | ) | const |
| const Atom* ceammc::AtomList::find | ( | AtomPredicate | pred | ) | const |
| Atom* ceammc::AtomList::find | ( | AtomPredicate | pred | ) |
| const Atom* ceammc::AtomList::findLast | ( | AtomPredicate | pred | ) | const |
| Atom* ceammc::AtomList::findLast | ( | AtomPredicate | pred | ) |
| int ceammc::AtomList::findPos | ( | const Atom & | a | ) | const |
| int ceammc::AtomList::findPos | ( | AtomPredicate | pred | ) | const |
| Atom* ceammc::AtomList::first | ( | ) |
| const Atom* ceammc::AtomList::first | ( | ) | const |
| Atom* ceammc::AtomList::foldAt | ( | int | pos | ) |
Same as at(), but values for index greater than the size of the List will be folded back.
| pos | - position index |
| const Atom* ceammc::AtomList::foldAt | ( | int | pos | ) | const |
| void ceammc::AtomList::fromPdData | ( | size_t | n, |
| t_atom * | lst | ||
| ) |
| void ceammc::AtomList::fromPdData | ( | int | n, |
| t_atom * | lst | ||
| ) |
| bool ceammc::AtomList::hasProperty | ( | const std::string & | name | ) | const |
Checks is has property in list
| bool ceammc::AtomList::insert | ( | size_t | pos, |
| const Atom & | a | ||
| ) |
| bool ceammc::AtomList::insert | ( | size_t | pos, |
| const AtomList & | l | ||
| ) |
| Atom* ceammc::AtomList::last | ( | ) |
| const Atom* ceammc::AtomList::last | ( | ) | const |
| const Atom* ceammc::AtomList::max | ( | ) | const |
| Atom* ceammc::AtomList::max | ( | ) |
| const Atom* ceammc::AtomList::min | ( | ) | const |
| Atom* ceammc::AtomList::min | ( | ) |
| bool ceammc::AtomList::noneOff | ( | AtomPredicate | pred | ) | const |
| bool ceammc::AtomList::normalizeFloats | ( | ) |
|
static |
| AtomList ceammc::AtomList::operator* | ( | double | v | ) | const |
| AtomList& ceammc::AtomList::operator*= | ( | double | v | ) |
| AtomList ceammc::AtomList::operator+ | ( | double | v | ) | const |
| AtomList& ceammc::AtomList::operator+= | ( | double | v | ) |
arithmetic operators
| AtomList ceammc::AtomList::operator- | ( | double | v | ) | const |
| AtomList& ceammc::AtomList::operator-= | ( | double | v | ) |
| AtomList ceammc::AtomList::operator/ | ( | double | v | ) | const |
| AtomList& ceammc::AtomList::operator/= | ( | double | v | ) |
| Atom& ceammc::AtomList::operator[] | ( | size_t | pos | ) |
| const Atom& ceammc::AtomList::operator[] | ( | size_t | pos | ) | const |
| void ceammc::AtomList::output | ( | t_outlet * | x | ) | const |
Outputs list to given outlet
| x | - pointer to outlet |
| void ceammc::AtomList::outputAsAny | ( | t_outlet * | x | ) | const |
Outputs list content as any message. First list atom became selector
Outputs list content as any message.
| x | - pointer to outlet |
| s | - any selector |
| void ceammc::AtomList::outputAtoms | ( | t_outlet * | x | ) | const |
output list atoms separatly, one by one
| x | - output outlet |
| float ceammc::AtomList::product | ( | ) | const |
Returns product of floats in list or 0 if empty
| std::deque<AtomList> ceammc::AtomList::properties | ( | ) | const |
Returns all properties and their values from list
| bool ceammc::AtomList::property | ( | const std::string & | name, |
| Atom * | dest | ||
| ) | const |
Get property value from list
| name | - property name with (starts with '@') |
| dest | - output destination |
| T ceammc::AtomList::reduce | ( | T | init, |
| T(*)(const Atom &, const Atom &) | fn | ||
| ) | const |
| t_float ceammc::AtomList::reduceFloat | ( | t_float | init, |
| t_float | def, | ||
| t_float(*)(t_float, t_float) | fn | ||
| ) | const |
| Atom* ceammc::AtomList::relativeAt | ( | int | pos | ) |
| const Atom* ceammc::AtomList::relativeAt | ( | int | pos | ) | const |
| bool ceammc::AtomList::remove | ( | size_t | pos | ) |
| void ceammc::AtomList::removeAll | ( | const Atom & | a | ) |
| void ceammc::AtomList::removeAll | ( | AtomPredicate | pred | ) |
| void ceammc::AtomList::replaceAll | ( | AtomPredicate | pred, |
| const Atom & | new_value | ||
| ) |
| void ceammc::AtomList::resizeClip | ( | size_t | n | ) |
Resize list. If new size is less than current, last values are dropped. If new size is bigger - pad with last value
| n | - new size |
| v | - pad value |
| void ceammc::AtomList::resizeFold | ( | size_t | n | ) |
Resize list. If new size is less than current, last values are dropped. If new size is bigger - fold with list values
| n | - new size |
| v | - pad value |
| void ceammc::AtomList::resizePad | ( | size_t | n, |
| const Atom & | v | ||
| ) |
Resize list. If new size is less than current, last values are dropped. If new size is bigger - pad with given value
| n | - new size |
| v | - pad value |
| void ceammc::AtomList::resizeWrap | ( | size_t | n | ) |
Resize list. If new size is less than current, last values are dropped. If new size is bigger - wrap with list values
| n | - new size |
| v | - pad value |
| void ceammc::AtomList::reverse | ( | ) |
| void ceammc::AtomList::shuffle | ( | ) |
| size_t ceammc::AtomList::size | ( | ) | const |
| AtomList ceammc::AtomList::slice | ( | int | start | ) | const |
| AtomList ceammc::AtomList::slice | ( | int | start, |
| int | end, | ||
| size_t | step = 1 |
||
| ) | const |
| void ceammc::AtomList::sort | ( | ) |
|
static |
returns new list that contains difference from given lists
| a | - first list |
| b | - second list |
| lb | - behaivor flag, when lists are different lengths |
| AtomList ceammc::AtomList::subList | ( | int | begin, |
| int | end | ||
| ) |
| float ceammc::AtomList::sum | ( | ) | const |
Returns sum of floats in list or 0 if empty
| t_atom* ceammc::AtomList::toPdData | ( | ) | const |
|
static |
| Atom* ceammc::AtomList::wrapAt | ( | int | pos | ) |
Same as at(), but values for index greater than the size of the List will be wrapped around to 0.
| pos | - position index |
| const Atom* ceammc::AtomList::wrapAt | ( | int | pos | ) | const |
|
static |
1.8.6