|
| auto | argmin () const |
| | Argmin function returns the index of the smallest element in the vector.
|
| |
| auto | argmax () const |
| | Argmax function returns the index of the largest element in the vector.
|
| |
| void | sort () |
| | Sort function sorts the elements in the vector in ascending order.
|
| |
| T | min () const |
| | min function returns the smalled element in the vector
|
| |
| T | max () const |
| | max function returns the largest element in the vector
|
| |
| T | sum () const |
| | Sum function returns the sum of all elements in the vector.
|
| |
| int | index (const T &element) const |
| | get the index of an element in the vector
|
| |
| bool | exist (const T &element) const |
| | check if the element exists in the vector
|
| |
| bool | hasCommonElement (const Vector< T > &other) const |
| | check if the other vector contains any value in the current vector
|
| |
| bool | isSubsetOf (const Vector< T > &other) const |
| | check if the other vector is a subset of the current vector
|
| |
| void | insertToEnd (const std::vector< T > &other_vector) |
| | insert another vector to the end of this vector
|
| |
| bool | removeValue (const T &value) |
| | Removes the value described by value.
|
| |
| std::string | toString () const |
| | Convert this object into a string representation.
|
| |
| std::string | toNotFormattedString () const |
| |
template<typename T>
class Vector< T >
A vector.
- Author
- Ahmed Aredah
- Date
- 2/28/2023
- Template Parameters
-