2.2.7.9 oset
Name
oset
Remark
The OriginC oset class is an associative container that stores unique elements in a strictly sorted order. For oset<double> and oset<float>, NANUM, NaN and Inf cannot be stored. Insert, Contains, and Erase all return FALSE for those values.
Hierarchy
Examples
EX1
void set_ex() { oset<string> s1; s1.Insert("hello"); s1.Insert("Hello"); s1.Insert("world"); if (s1.Contains("Hello")) out_str("Hello exists."); vector<string> vs; s1.GetAsVector(vs); }
Header to Include
Reference
Members
| Name | Brief | Example |
|---|---|---|
| Insert | Adds one element to the set | Examples |
| oset | Default constructor | Examples |
| Contains | Check whether a value is in the set | Examples |
| Erase | Remove the specified value from the set | Examples |
| GetSize | Return the size of the set | Examples |
| RemoveAll | Remove all value from the set | Examples |
| GetAsVector | Get the values of entire set and assign them to a vector. | Examples |