Audio Processing Framework (APF) version 0.5.0
|
Two-dimensional data storage for row- and column-wise access. More...
#include <apf/container.h>
Classes | |
class | channels_iterator |
Iterator over fixed_matrix::Channels. More... | |
class | slices_iterator |
Iterator over fixed_matrix::Slices. More... | |
Public Types | |
using | Channel = has_begin_and_end< pointer > |
Proxy class for returning one channel of the fixed_matrix. More... | |
using | channel_iterator = typename Channel::iterator |
Iterator within a Channel. More... | |
using | Slice = has_begin_and_end< stride_iterator< channel_iterator > > |
Proxy class for returning one slice of the fixed_matrix. More... | |
using | slice_iterator = typename Slice::iterator |
Iterator within a Slice. More... | |
Public Member Functions | |
fixed_matrix (const Allocator &a=Allocator()) | |
Default constructor. More... | |
fixed_matrix (fixed_matrix &&)=default | |
fixed_matrix (const fixed_matrix &)=delete | |
fixed_matrix & | operator= (const fixed_matrix &)=delete |
fixed_matrix & | operator= (fixed_matrix &&)=delete |
fixed_matrix (size_type max_channels, size_type max_slices, const Allocator &a=Allocator()) | |
Constructor. More... | |
void | initialize (size_type max_channels, size_type max_slices) |
Allocate memory for max_channels x max_slices elements and default-construct them. More... | |
template<typename Ch > | |
void | set_channels (const Ch &ch) |
Copy channels from another matrix. More... | |
pointer const * | get_channel_ptrs () const |
Get array of pointers to the channels. More... | |
Public Member Functions inherited from apf::fixed_vector< T, std::allocator< T > > | |
fixed_vector (fixed_vector &&)=default | |
fixed_vector (const fixed_vector &)=delete | |
fixed_vector (Args &&... args) | |
Constructor that forwards everything except if first type is integral. More... | |
fixed_vector (size_type n) | |
fixed_vector (Size n, Arg &&arg, const std::allocator< T > &a) | |
fixed_vector (Size n, Args &&... args) | |
Constructor from size and initialization arguments. More... | |
fixed_vector (std::initializer_list< value_type > il, const std::allocator< T > &a=std::allocator< T >()) | |
fixed_vector & | operator= (const fixed_vector &)=delete |
fixed_vector & | operator= (fixed_vector &&)=delete |
void | resize (size_type n) |
Reserve space for new elements and default-construct them. More... | |
void | reserve (size_type n) |
Reserve space for new elements. More... | |
void | emplace_back (Args &&... args) |
Construct element at the end. More... | |
Public Attributes | |
has_begin_and_end< channels_iterator > | channels |
Access to Channels; use channels.begin() and channels.end() More... | |
has_begin_and_end< slices_iterator > | slices |
Access to Slices; use slices.begin() and slices.end() More... | |
Two-dimensional data storage for row- and column-wise access.
The two dimensions have following properties:
T | Type of stored data |
Definition at line 341 of file container.h.
using apf::fixed_matrix< T, Allocator >::Channel = has_begin_and_end<pointer> |
Proxy class for returning one channel of the fixed_matrix.
Definition at line 351 of file container.h.
using apf::fixed_matrix< T, Allocator >::channel_iterator = typename Channel::iterator |
Iterator within a Channel.
Definition at line 353 of file container.h.
using apf::fixed_matrix< T, Allocator >::Slice = has_begin_and_end<stride_iterator<channel_iterator> > |
Proxy class for returning one slice of the fixed_matrix.
Definition at line 356 of file container.h.
using apf::fixed_matrix< T, Allocator >::slice_iterator = typename Slice::iterator |
Iterator within a Slice.
Definition at line 358 of file container.h.
|
inlineexplicit |
Default constructor.
Only initialize() makes sense after this.
Definition at line 365 of file container.h.
References apf::fixed_matrix< T, Allocator >::initialize().
|
inline |
Constructor.
max_channels | Number of Channels |
max_slices | Number of Slices |
a | Optional allocator |
Definition at line 381 of file container.h.
References apf::fixed_matrix< T, Allocator >::initialize().
|
inline |
Allocate memory for max_channels
x max_slices
elements and default-construct them.
Definition at line 391 of file container.h.
References apf::fixed_matrix< T, Allocator >::channels, and apf::fixed_vector< T, Allocator >::resize().
Referenced by apf::fixed_matrix< T, Allocator >::fixed_matrix().
void apf::fixed_matrix< T, Allocator >::set_channels | ( | const Ch & | ch | ) |
Copy channels from another matrix.
ch | channels (or slices) to copy from another fixed_matrix |
std::copy()
from fixed_matrix::begin() to fixed_matrix::end(). Definition at line 589 of file container.h.
Referenced by apf::mimoprocessor_file_io().
|
inline |
Get array of pointers to the channels.
This can be useful to interact with functions which use plain pointers instead of iterators.
Definition at line 413 of file container.h.
Referenced by apf::mimoprocessor_file_io().
has_begin_and_end<channels_iterator> apf::fixed_matrix< T, Allocator >::channels |
Access to Channels; use channels.begin() and channels.end()
Definition at line 416 of file container.h.
Referenced by apf::fixed_matrix< T, Allocator >::initialize().
has_begin_and_end<slices_iterator> apf::fixed_matrix< T, Allocator >::slices |
Access to Slices; use slices.begin() and slices.end()
Definition at line 418 of file container.h.
Referenced by apf::mimoprocessor_file_io().