|
FAUST compiler
0.9.9.6b8
|
Count subtree occurences Count the number of occurences of each subtree of a root tree. More...
#include <occurrences.hh>

Public Member Functions | |
| Occurrences (Tree root) | |
| Count the number of occurrences of each subtree of root. More... | |
| int | getCount (Tree t) |
| Get the number of occurrences of t. More... | |
Private Member Functions | |
| Tree | specificKey (Tree root) |
| Creates a specific property key for occurrences count in root. More... | |
| void | countOccurrences (Tree t) |
| Increment the occurrences count of t and its subtrees. More... | |
| void | setCount (Tree t, int c) |
| Set the number of occurrences of t. More... | |
Private Attributes | |
| Tree | fKey |
Count subtree occurences Count the number of occurences of each subtree of a root tree.
Definition at line 32 of file occurrences.hh.
| Occurrences::Occurrences | ( | Tree | root | ) |
Count the number of occurrences of each subtree of root.
Definition at line 38 of file occurrences.cpp.
References countOccurrences(), fKey, setCount(), and specificKey().

|
private |
Increment the occurrences count of t and its subtrees.
Definition at line 78 of file occurrences.cpp.
References CTree::arity(), CTree::branch(), getCount(), and setCount().
Referenced by Occurrences().


| int Occurrences::getCount | ( | Tree | t | ) |
Get the number of occurrences of t.
Definition at line 48 of file occurrences.cpp.
References fKey, Node::getInt(), getProperty(), and CTree::node().
Referenced by countOccurrences().


|
private |
Set the number of occurrences of t.
Definition at line 57 of file occurrences.cpp.
References fKey, setProperty(), and tree().
Referenced by countOccurrences(), and Occurrences().


Creates a specific property key for occurrences count in root.
Definition at line 67 of file occurrences.cpp.
References tree(), and unique().
Referenced by Occurrences().


|
private |
Definition at line 34 of file occurrences.hh.
Referenced by getCount(), Occurrences(), and setCount().
1.8.7