xc
|
Base class for position matrices used to represent grids of points. More...
#include <PosArray.h>
Public Types | |
typedef TMatrix< POS, std::vector< POS > > | m_pos |
typedef POS::vector | vector |
![]() | |
typedef std::list< POS > | lst_T |
typedef std::vector< POS > ::iterator | iterator |
typedef std::vector< POS > ::const_iterator | const_iterator |
typedef std::vector< POS > ::value_type | value_type |
typedef std::vector< POS > ::reference | reference |
typedef std::vector< POS > ::const_reference | const_reference |
typedef BoxConstRef< TMatrix< POS, std::vector< POS > > > | box_const_ref |
typedef RowConstRef< TMatrix< POS, std::vector< POS > > > | row_const_ref |
typedef ColumnConstRef< TMatrix< POS, std::vector< POS > > > | const_ref_col |
Public Member Functions | |
PosArray (const size_t &f=1, const size_t &c=1, const POS &p=POS()) | |
PosArray (const POS &p1, const POS &p2, const size_t &num, const GEOM_FT &ratio) | |
Build the point matrix between p1 and p2 in such way that, the firs point is p1, the number of point is num and each point is obtained by summing the product of ratio by the p1p2 vector to the previous one. More... | |
PosArray (const POS &p1, const POS &p2, const size_t &ndiv) | |
Build the point matrix between p1 and p2 in such way that, the firs point is p1, the last one is p2 and the intermediate points result from dividing the segment p1p2 in ndiv equal parts. More... | |
PosArray (const POS &p1, const POS &p2, const std::vector< GEOM_FT > &longs) | |
Build the point matrix between p1 and p2 in such way that, the firs point is p1 the last one is p2, the number of points is longs.size()+1 and the lengths of interior segments are proportional to those in longs. More... | |
PosArray (const POS &p0, const POS &p1, const POS &p2, const size_t &ndiv1, const size_t &ndiv2) | |
Constructor. | |
PosArray (const PosArray &l1_points, const PosArray &l2_points, const PosArray &l3_points, const PosArray &l4_points) | |
PosArray< POS > | getBox (size_t f1, size_t c1, size_t f2, size_t c2) const |
PosArray< POS > | getRow (size_t iRow) const |
PosArray< POS > | getColumn (size_t col) const |
![]() | |
TMatrix (size_t rows=1, size_t n_columns=1) | |
Constructor por defecto. | |
TMatrix (size_t n_rows, size_t n_columns, POS val) | |
Constructor. | |
TMatrix (const size_t &n_rows, const size_t &n_columns, InputIterator b, InputIterator e) | |
Constructor con lista inicialización. | |
TMatrix (const TMatrix< POS, std::vector< POS > > &) | |
Constructor de copia. | |
TMatrix< POS, std::vector< POS > > & | operator= (const TMatrix< POS, std::vector< POS > > &m) |
Assignment operator. | |
TMatrix< POS, std::vector< POS > > & | operator= (const POS &n) |
virtual bool | operator== (const TMatrix< POS, std::vector< POS > > &) const |
Comparison operator. | |
void | resize (size_t n_rows, size_t n_columns, POS val) |
Assignment operator. | |
size_t | size (void) const |
const std::vector< POS > & | getVector (void) const |
const_reference | front () const |
reference | front () |
const_reference | back () const |
reference | back () |
const_iterator | begin () const |
iterator | begin () |
const_iterator | end () const |
iterator | end () |
TMatrix< POS, std::vector< POS > > & | Con (const POS &t) |
virtual reference | operator() (size_t iRow=1, size_t col=1) |
virtual const_reference | operator() (size_t iRow=1, size_t col=1) const |
virtual reference | at (size_t iRow=1, size_t col=1) |
virtual const_reference | at (size_t iRow=1, size_t col=1) const |
void | assign (size_t row, size_t col, const POS &value) |
Put the box int the position (f,c) of this matrix. | |
void | swap (size_t f1, size_t c1, size_t f2, size_t c2) |
TMatrix< POS, std::vector< POS > > & | Trn (void) |
TMatrix< POS, std::vector< POS > > | GetTrn (void) const |
TMatrix< POS, std::vector< POS > > | getBox (size_t f1, size_t c1, size_t f2, size_t c2) const |
box_const_ref | GetBoxConstRef (size_t f1, size_t c1, size_t f2, size_t c2) const |
box_const_ref | GetBoxConstRef (const RangoIndice &row_range, const RangoIndice &column_range) const |
box_const_ref | GetBoxConstRef (size_t f=1, size_t c=1) const |
TMatrix< POS, std::vector< POS > > | getRow (size_t iRow) const |
row_const_ref | getRowConstRef (size_t f, size_t c1, size_t c2) const |
row_const_ref | getRowConstRef (size_t f, const RangoIndice &column_range) const |
row_const_ref | getRowConstRef (size_t f=1, size_t c=1) const |
const_ref_col | getColumnConstRef (size_t c, size_t f1, size_t f2) const |
const_ref_col | getColumnConstRef (const RangoIndice &row_range, size_t c) const |
const_ref_col | getColumnConstRef (size_t c=1, size_t f=1) const |
TMatrix< POS, std::vector< POS > > | getColumn (size_t col) const |
TMatrix< POS, std::vector< POS > > | GetMenor (size_t f, size_t c) const |
Return the minor of the matrix that corresponds to the row and the column arguments. More... | |
void | putBox (size_t f, size_t c, const TMatrix< POS, std::vector< POS > > &) |
Put the box int the position (f,c) of this matrix. | |
void | putRow (size_t iRow, const TMatrix< POS, std::vector< POS > > &f) |
void | PutCol (size_t col, const TMatrix< POS, std::vector< POS > > &c) |
void | OrlaCol (const TMatrix< POS, std::vector< POS > > &c) |
void | decorateRow (const TMatrix< POS, std::vector< POS > > &f) |
void | swapRows (size_t f1, size_t f2) |
void | swapColumns (size_t c1, size_t c2) |
virtual void | Print (std::ostream &) const |
virtual void | Input (std::istream &) |
Lectura desde istream. | |
virtual void | Input (const std::string &) |
Lectura desde string. | |
![]() | |
ProtoMatrix (size_t n_rows=1, size_t n_columns=1) | |
ProtoMatrix (const ProtoMatrix &other) | |
ProtoMatrix & | operator= (const ProtoMatrix &m) |
virtual bool | operator== (const ProtoMatrix &other) const |
virtual void | resize (size_t n_rows, size_t n_columns) |
virtual size_t | Tam (void) |
size_t | getNumberOfRows (void) const |
size_t | getNumberOfColumns (void) const |
bool | CheckIndices (const size_t &f, const size_t &c) const |
bool | interior (const size_t &i, const size_t &j) const |
Return true if the indices correspond to a component. | |
int | Cuadrada (void) const |
bool | isRow (void) const |
bool | isColumn (void) const |
Protected Member Functions | |
PosArray (const PosArray< POS > &mp, size_t &f1, size_t &c1, size_t &f2, size_t &c2) | |
![]() | |
virtual size_t | Indice (const size_t &iRow, const size_t &iCol) const |
bool | equal_to (const TMatrix< POS, std::vector< POS > > &m2) const |
TMatrix (const TMatrix< POS, std::vector< POS > > &orig, size_t f1, size_t c1, size_t f2, size_t c2) | |
![]() | |
void | PutDim (size_t nRows, size_t nCols) |
void | inic (size_t n_rows, size_t n_columns) |
virtual bool | check_range (const size_t &iRow, const size_t &col) const |
void | check_put_box (size_t f, size_t c, const ProtoMatrix &box) const |
void | check_get_box (size_t f1, size_t c1, size_t f2, size_t c2) const |
void | check_sto_sum (const ProtoMatrix &m) const |
void | check_sto_dif (const ProtoMatrix &m) const |
void | check_traza (void) const |
Additional Inherited Members | |
![]() | |
size_t | n_rows |
size_t | n_columns |
Base class for position matrices used to represent grids of points.
PosArray< POS >::PosArray | ( | const POS & | p1, |
const POS & | p2, | ||
const size_t & | num, | ||
const GEOM_FT & | ratio | ||
) |
Build the point matrix between p1 and p2 in such way that, the firs point is p1, the number of point is num and each point is obtained by summing the product of ratio by the p1p2 vector to the previous one.
PosArray< POS >::PosArray | ( | const POS & | p1, |
const POS & | p2, | ||
const size_t & | ndiv | ||
) |
Build the point matrix between p1 and p2 in such way that, the firs point is p1, the last one is p2 and the intermediate points result from dividing the segment p1p2 in ndiv equal parts.
So if ndiv= 1 only the p1 and p2 points are created. If ndiv= 2 the midpoint of the segment is created in addition to p1 and p2, and so on...
PosArray< POS >::PosArray | ( | const POS & | p1, |
const POS & | p2, | ||
const std::vector< GEOM_FT > & | longs | ||
) |
Build the point matrix between p1 and p2 in such way that, the firs point is p1 the last one is p2, the number of points is longs.size()+1 and the lengths of interior segments are proportional to those in longs.
l[0] l[1] l[2] l[3] l[4] *----—+-------—+--—+--------—+--—+ p1 p2