#include <matrices.h>
Public Methods | |
vector (index n_init=0, index n_delta_init=2) | |
vector (index n_init, T *a, index n_delta_init=2) | |
vector (const vector< T > &x) | |
vector< T > & | operator= (const vector< T > &x) |
~vector (void) | |
index | get_n (void) const |
T & | operator[] (index j) |
T | at (index j) const |
T | access (index j) const |
void | resize (index new_n=0) |
void | ins_item (index j, T item=0) |
void | join (T item) |
int | member (T item) const |
index | index_of_item (T item) const |
void | del_item (index j) |
T | take_item (index j) |
void | swap_items (index j1, index j2) |
vector< T > & | operator+= (const vector< T > &x) |
vector< T > & | operator-= (const vector< T > &x) |
Friends | |
ostream & | operator<< (ostream &s, const vector< T > &x) |
istream & | operator>> (istream &s, vector< T > &x) |
vector< T > | operator+ (const vector< T > &a, const vector< T > &b) |
vector< T > | operator- (const vector< T > &a, const vector< T > &b) |
vector< T > | operator * (const T alpha, const vector< T > &a) |
T | operator * (const vector< T > &a, const vector< T > &b) |
int | operator== (const vector< T > &a, const vector< T > &b) |
int | operator!= (const vector< T > &a, const vector< T > &b) |
void | pretty (ostr &s, const vector< T > &A) |
istream & | operator>> (istream &s, vector< T > &x) |
Related Functions | |
(Note that these are not member functions.) | |
void | mesh_grid (vector< T > &v, T begin, T end, T step) |
Definition at line 115 of file matrices.h.
|
v is initialized to the vector of undefined entries of size n_init, n_delta_init is the increasing step.
Definition at line 552 of file matrices.h. |
|
v is initialized to the vector of size n_init with enties stored in a, n_delta_init is the increasing step.
Definition at line 562 of file matrices.h. |
|
Constructor.
Definition at line 579 of file matrices.h. |
|
Destructor.
Definition at line 616 of file matrices.h. |
|
Returns the j-th entry of v. Only for reading. Without bounds checking.
Definition at line 911 of file matrices.h. |
|
Returns the j-th entry of v. Only for reading.
Definition at line 631 of file matrices.h. Referenced by matrix::diag(), gcd(), and pretty().
|
|
Deletes item from the vector.
Definition at line 756 of file matrices.h. |
|
Returns the number of entries.
Definition at line 143 of file matrices.h. Referenced by matrix::cols(), matrix::del_cols(), matrix::del_rows(), matrix::diag(), gcd(), matrix::ins_col(), matrix::ins_row(), join(), operator *(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), operator>>(), pretty(), matrix::rows(), matrix::sumbatrix(), matrix::take_rows(), and vector().
|
|
Returns (the first) index of item or -1 if item is not in a vector.
Definition at line 747 of file matrices.h. Referenced by member(), and matrix::take_rows().
|
|
Inserts item in the position j.
Definition at line 691 of file matrices.h. Referenced by join().
|
|
Joins item to the end of a vector. x.ins_item(x.get_n(), item) makes the same Definition at line 732 of file matrices.h. |
|
Returns 1 if item is in a vector.
Definition at line 738 of file matrices.h. |
|
Combined assignment-addition operator.
Definition at line 835 of file matrices.h. |
|
Combined assignment-subtraction operator.
Definition at line 851 of file matrices.h. |
|
Assignment.
Definition at line 591 of file matrices.h. |
|
Returns the j-th entry of v.
Definition at line 622 of file matrices.h. |
|
Transforms a vector to a vector of size new_n. New entries are undefined Definition at line 643 of file matrices.h. Referenced by matrix::col(), mesh_grid(), operator *(), operator+(), operator-(), operator=(), operator>>(), matrix::row(), simplex_table::simplex_table(), and vector().
|
|
Swap items.
Definition at line 785 of file matrices.h. |
|
Deletes item from the vector and returns its value.
Definition at line 769 of file matrices.h. |
|
Returns a vector (begin, begin + step, begin + 2 * step, ...) the last component is less than or equal to end.
Definition at line 1862 of file matrices.h. |
|
Inner product.
Definition at line 879 of file matrices.h. |
|
Component multiplication with number alpha.
Definition at line 867 of file matrices.h. |
|
Test for inequality.
Definition at line 899 of file matrices.h. |
|
Addition.
Definition at line 799 of file matrices.h. |
|
Subtraction.
Definition at line 817 of file matrices.h. |
|
Output stream operator. First, writes the number of entries. Then writes entries Definition at line 665 of file matrices.h. |
|
Test for equality.
Definition at line 888 of file matrices.h. |
|
First, writes the number of entries. Then writes entries Definition at line 677 of file matrices.h. |
|
Input stream operator. First, writes the number of entries. Then writes entries Definition at line 677 of file matrices.h. |
|
Outputs a vector using latex notation.
Definition at line 1874 of file matrices.h. |