| 
    raiigraph
    
   C++ RAII for igraph data structures 
   | 
 
Wrapper around igraph_vector_*_t objects with RAII behavior.  
 More...
#include <Vector.hpp>
Public Types | |
| typedef Ns_::igraph_type | igraph_type | 
| typedef Ns_::value_type | value_type | 
| typedef value_type & | reference | 
| typedef const value_type & | const_reference | 
| typedef igraph_int_t | size_type | 
| typedef igraph_int_t | difference_type | 
| typedef value_type * | iterator | 
| typedef const value_type * | const_iterator | 
| typedef std::reverse_iterator< iterator > | reverse_iterator | 
| typedef std::reverse_iterator< const_iterator > | reverse_const_iterator | 
Public Member Functions | |
| Vector () | |
| Vector (size_type size, const value_type &val=value_type()) | |
| Vector (igraph_type &&vector) | |
| template<typename InputIterator , typename = decltype(*std::declval<InputIterator>())> | |
| Vector (InputIterator first, InputIterator last) | |
| Vector (const Vector< Ns_ > &other) | |
| Vector< Ns_ > & | operator= (const Vector< Ns_ > &other) | 
| Vector (Vector< Ns_ > &&other) | |
| Vector & | operator= (Vector< Ns_ > &&other) | 
| ~Vector () | |
| igraph_bool_t | empty () const | 
| size_type | size () const | 
| constexpr size_type | max_size () const | 
| size_type | capacity () const | 
| void | clear () | 
| void | resize (size_type size, value_type val=value_type()) | 
| void | reserve (size_type capacity) | 
| void | shrink_to_fit () | 
| void | push_back (value_type val) | 
| template<typename ... Args> | |
| void | emplace_back (Args &&... args) | 
| void | pop_back () | 
| iterator | erase (iterator pos) | 
| iterator | erase (iterator first, iterator last) | 
| iterator | insert (iterator pos, value_type val) | 
| template<typename ... Args> | |
| iterator | emplace (iterator pos, Args &&... args) | 
| iterator | insert (iterator pos, size_type n, value_type val) | 
| template<typename InputIterator , typename = decltype(*std::declval<InputIterator>())> | |
| iterator | insert (iterator pos, InputIterator first, InputIterator last) | 
| reference | operator[] (igraph_int_t i) | 
| const_reference | operator[] (igraph_int_t i) const | 
| reference | back () | 
| const_reference | back () const | 
| reference | front () | 
| const_reference | front () const | 
| iterator | begin () | 
| iterator | end () | 
| const_iterator | begin () const | 
| const_iterator | end () const | 
| const_iterator | cbegin () const | 
| const_iterator | cend () const | 
| value_type * | data () | 
| const value_type * | data () const | 
| reverse_iterator | rbegin () | 
| reverse_iterator | rend () | 
| reverse_const_iterator | rbegin () const | 
| reverse_const_iterator | rend () const | 
| reverse_const_iterator | crbegin () const | 
| reverse_const_iterator | crend () const | 
| operator igraph_type * () | |
| operator const igraph_type * () const | |
| igraph_type * | get () | 
| const igraph_type * | get () const | 
| void | swap (Vector< Ns_ > &other) | 
Wrapper around igraph_vector_*_t objects with RAII behavior. 
| Ns_ | Structure-based namespace with static methods, internal use only. | 
This class has ownership of the underlying igraph_vector_*_t object, handling both its initialization and destruction. Users should only pass instances of this class to igraph functions that accept an already-initialized vector. Users should not attempt to destroy the vector manually as this is done automatically when the Vector goes out of scope.
It is assumed that users have already called igraph_setup() or initialize() before constructing a instance of this class. 
| const value_type* raiigraph::Vector< Ns_ >::const_iterator | 
Const iterator for the vector contents.
| const value_type& raiigraph::Vector< Ns_ >::const_reference | 
Type of a const reference to values inside the vector.
| igraph_int_t raiigraph::Vector< Ns_ >::difference_type | 
Integer type for differences in positions within the vector.
| Ns_::igraph_type raiigraph::Vector< Ns_ >::igraph_type | 
Type of the underlying igraph vector.
| value_type* raiigraph::Vector< Ns_ >::iterator | 
Iterator for the vector contents.
| value_type& raiigraph::Vector< Ns_ >::reference | 
Type of the reference to values inside the vector.
| std::reverse_iterator<const_iterator> raiigraph::Vector< Ns_ >::reverse_const_iterator | 
Reverse const iterator for the vector contents.
| std::reverse_iterator<iterator> raiigraph::Vector< Ns_ >::reverse_iterator | 
Reverse iterator for the vector contents.
| igraph_int_t raiigraph::Vector< Ns_ >::size_type | 
Integer type for the size of the vector.
| Ns_::value_type raiigraph::Vector< Ns_ >::value_type | 
Type of the values inside the vector.
      
  | 
  inline | 
Default constructor, creates an initialized vector of length 0.
      
  | 
  inline | 
| size | Size of the vector to create. | 
| val | Value to use to fill the vector. | 
      
  | 
  inline | 
| vector | An initialized vector to take ownership of. | 
      
  | 
  inline | 
| InputIterator | Iterator type that supports forward increments and subtraction. | 
| first | Iterator to the start of a range. | 
| last | Iterator to the end of a range (i.e., past the final element in the range). | 
      
  | 
  inline | 
| other | Vector to be copy-constructed from. This constructor will make a deep copy. | 
      
  | 
  inline | 
| other | Vector to be move-constructed from. This constructor will leave other in a valid but unspecified state.  | 
      
  | 
  inline | 
Destructor.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Clear this vector, leaving it with a size of zero.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Construct and insert an element into the vector.
| pos | Position at which to insert the new element. | 
| args | Arguments for the value_type constructor.  | 
      
  | 
  inline | 
Construct and add a new element to the end of the vector.
| args | Arguments for the value_type constructor.  | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Erase an element from the vector.
| first | Start of the range of elements to remove. | 
| last | End of the range of elements to remove. | 
      
  | 
  inline | 
Erase an element from the vector.
| pos | Position at which to erase the element. | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Insert a sequence of elements into the vector.
| InputIterator | Iterator type that supports forward increments and subtraction. | 
| pos | Position at which to insert the new elements. | 
| first | Iterator to the start of a range. | 
| last | Iterator to the end of a range (i.e., past the final element in the range). | 
      
  | 
  inline | 
Insert multiple copies of an element into the vector.
| pos | Position at which to insert the new elements. | 
| n | Number of values to insert. | 
| val | Value to be inserted. | 
      
  | 
  inline | 
Insert an element into the vector.
| pos | Position at which to insert the new element. | 
| val | Value to be inserted. | 
      
  | 
  inlineconstexpr | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
| other | Vector to be copy-assigned from. This constructor will make a deep copy. | 
      
  | 
  inline | 
| other | Vector to be move-assigned from. This constructor will leave other in a valid but unspecified state.  | 
      
  | 
  inline | 
| i | Index on the vector. | 
i. 
      
  | 
  inline | 
| i | Index on the vector. | 
i. 
      
  | 
  inline | 
Remove an element from the end of the vector.
      
  | 
  inline | 
Add a new element to the end of the vector.
| val | Value to be added. | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Reserve the capacity of the vector.
| capacity | Capacity of the vector. | 
      
  | 
  inline | 
Resize the vector to the specified size. 
| size | New size of the vector. | 
| val | Value to use to fill the new elements, if size is greater than the current size.  | 
      
  | 
  inline | 
Shrink the capacity of the vector to fit the contents.
      
  | 
  inline | 
      
  | 
  inline | 
Swap two vectors, maintaining the validity of existing pointers to each vector and its elements.
| other | Vector to be swapped. |