#include <matrixadapter.h>
Public Types | |
| typedef M::size_type | size_type |
| typedef int | Coordinate |
| typedef M::value_type | value_type |
Public Methods | |
| matrixadapter () | |
| Default constructor. More... | |
| matrixadapter (const M& x, const value_type& a=1.0, const value_type& b=0.0, size_type nr=0, size_type nc=0, size_type o_r=0, size_type o_c=0, double sr=1, double sc=1) | |
| Typical constructor; all arguments optional except the underlying matrix. More... | |
| bool | inbounds (const size_type r, const size_type c) const |
| Returns true if the given coordinates are within the matrix. More... | |
| value_type | operator() (const size_type row, const size_type col) const |
| size_type | nrows () const |
| Number of rows in the virtual matrix. More... | |
| size_type | ncols () const |
| Number of columns in the virtual matrix. More... | |
Protected Attributes | |
| M | m |
| value_type | alpha |
| value_type | beta |
| size_type | height |
| size_type | width |
| Coordinate | originr |
| Coordinate | originc |
| double | div_sizer |
| double | div_sizec |
Increases and decreases in size are not anti-aliased, so the result will be blocky. All computation is done as the elements are accessed, and no temporary matrix is used.
This adapter is particularly useful for plotting a matrix whose values are in an inconvenient range, which you want to situate in a larger or smaller area, or of which you want only a portion.
Definition at line 28 of file matrixadapter.h.
|
|||
|
Definition at line 33 of file matrixadapter.h. |
|
|||
|
Definition at line 32 of file matrixadapter.h. |
|
|||
|
Definition at line 34 of file matrixadapter.h. |
|
||||
|
Default constructor.
Definition at line 37 of file matrixadapter.h. |
|
||||||||||||||||||||
|
Typical constructor; all arguments optional except the underlying matrix. Linear value scaling is provided as val=orig*a+b. The height and width default to the natural size of the matrix; they can be overridden to any nonzero value, and will be taken relative to the original size of the matrix, regardless of any subsequent scaling. (Specified height and width must be nonzero due to a limitation of GCC 2.95.2 and earlier, which do not allow member functions in default initializers.) Values outside the native size of the array are assumed to be zero, and thus the offset b is returned. The underlying array may be placed at an arbitrary origin (or,oc) within the full region, and the full region is then scaled in size by sr and sc. Definition at line 55 of file matrixadapter.h. |
|
||||||
|
Returns true if the given coordinates are within the matrix.
Definition at line 66 of file matrixadapter.h. |
|
||||
|
Number of columns in the virtual matrix.
Definition at line 98 of file matrixadapter.h. |
|
||||
|
Number of rows in the virtual matrix.
Definition at line 95 of file matrixadapter.h. |
|
||||||
|
Definition at line 73 of file matrixadapter.h. |
|
|||
|
Definition at line 103 of file matrixadapter.h. |
|
|||
|
Definition at line 103 of file matrixadapter.h. |
|
|||
|
Definition at line 106 of file matrixadapter.h. |
|
|||
|
Definition at line 106 of file matrixadapter.h. |
|
|||
|
Definition at line 104 of file matrixadapter.h. |
|
|||
|
Definition at line 101 of file matrixadapter.h. |
|
|||
|
Definition at line 105 of file matrixadapter.h. |
|
|||
|
Definition at line 105 of file matrixadapter.h. |
|
|||
|
Definition at line 104 of file matrixadapter.h. |
1.2.1 written by Dimitri van Heesch,
© 1997-2000