find an element @a x @return @a find returns the index + 1 of @a x, if @a x is an element of the degree pattern, 0 otherwise
| 157 | /// @return @a find returns the index + 1 of @a x, if @a x is an element of |
| 158 | /// the degree pattern, 0 otherwise |
| 159 | int find (const int x ///< [in] some int |
| 160 | ) const |
| 161 | { |
| 162 | if (getLength() == 0) return 0; |
| 163 | for (int i= 0; i < getLength(); i++) |
| 164 | if ((*this)[i] == x) return i + 1; |
| 165 | return 0; |
| 166 | }; |
| 167 | |
| 168 | /// intersect two degree patterns |
| 169 | void intersect (const DegreePattern& degPat ///< [in] some degree pattern |
no outgoing calls
no test coverage detected