C++ Reference: class VectorMap

This documentation is automatically generated.

Method
Add

Return type: int

Arguments: const T& element

Adds an element if not already present, and returns its index in the vector-map.

Add

Return type: void

Arguments: const std::vector<T>& elements

Adds all elements of the vector.

begin

Return type: const_iterator

clear

Return type: void

Clears all the elements added to the vector-map.

Contains

Return type: bool

Arguments: const T& element

Returns whether the element has already been added to the vector-map.

Element

Return type: const T&

Arguments: int index

Returns the element at position index.

end

Return type: const_iterator

Index

Return type: int

Arguments: const T& element

Returns -1 if the element is not in the vector, or its unique index if it is.

IndexOrDie

Return type: int

Arguments: const T& element

Will return the index of the element if present, or die otherwise.

list

Return type: const std::vector<T>&

Returns a read-only access to the vector of elements.

rbegin

Return type: const_reverse_iterator

rend

Return type: const_reverse_iterator

size

Return type: int

Returns the number of distinct elements added to the vector-map.

Send feedback about...