|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Owns composite data and a bounded, independently owned window. More...
#include <CompositeContainer.hpp>
Inheritance diagram for MayaFlux::Kakshya::CompositeContainer:
Collaboration diagram for MayaFlux::Kakshya::CompositeContainer:Public Member Functions | |
| void | add_region_group (const RegionGroup &group) override |
| Store or replace a named region group. | |
| bool | at_end () const noexcept |
| Whether materialize_next() has no more elements. | |
| size_t | batch_size () const noexcept |
| Maximum elements copied by one materialize_next() call. | |
| void | clear () override |
| Remove all elements while retaining the field layout. | |
| CompositeContainer (CompositeArray data, size_t batch_size=1) | |
| Take ownership of an existing composite array. | |
| CompositeContainer (CompositeLayout layout, size_t batch_size=1) | |
| Construct empty source and materialized arrays with one layout. | |
| uint64_t | coordinates_to_linear_index (const std::vector< uint64_t > &coordinates) const override |
| Map an element coordinate to its linear index. | |
| std::unordered_map< std::string, RegionGroup > | get_all_region_groups () const override |
| Copy all named region groups. | |
| const CompositeArray & | get_data () const noexcept |
| Borrow the complete array. | |
| std::vector< DataDimension > | get_dimensions () const override |
| Describe the array's element axis. | |
| uint64_t | get_frame_size () const override |
| This container has no frame axis. | |
| const CompositeArray & | get_materialized_data () const noexcept |
| Borrow the most recently materialized owning window. | |
| MemoryLayout | get_memory_layout () const override |
| Packed composite elements use row-major storage. | |
| uint64_t | get_num_frames () const override |
| This container has no frame axis. | |
| const void * | get_raw_data () const override |
| Borrow the packed element bytes, or nullptr when empty. | |
| std::vector< CompositeArray > | get_region_data (const Region ®ion) const override |
| Copy a one-dimensional Region into an owning CompositeArray. | |
| RegionGroup | get_region_group (const std::string &name) const override |
| Return a named region group, or an empty group if absent. | |
| std::vector< CompositeArray > | get_region_group_data (const RegionGroup &group) const override |
| Copy the valid regions of a group into separate arrays. | |
| std::vector< CompositeArray > | get_segments_data (const std::vector< RegionSegment > &segments) const override |
| Copy valid one-dimensional segments into separate arrays. | |
| const ContainerDataStructure & | get_structure () const override |
| Dimensional metadata. | |
| ContainerDataStructure & | get_structure () override |
| Mutable dimensional metadata. | |
| uint64_t | get_total_elements () const override |
| Number of composite elements. | |
| bool | has_data () const override |
| Whether the array contains any elements. | |
| CompositeInsertion | insert () noexcept |
| Create an insertion adapter for the array. | |
| bool | is_region_loaded (const Region ®ion) const override |
| Valid element regions are already resident in the array. | |
| std::vector< uint64_t > | linear_index_to_coordinates (uint64_t linear_index) const override |
| Map a linear element index to one-dimensional coordinates. | |
| void | load_region (const Region &) override |
| Elements are already resident in the array. | |
| bool | materialize_next () |
| Copy the next bounded window into independent storage. | |
| size_t | position () const noexcept |
| Next element index for materialize_next(). | |
| void | remove_region_group (const std::string &name) override |
| Remove a named region group if present. | |
| void | seek (size_t row) noexcept |
| Set the next source position for materialize_next(). | |
| void | set_batch_size (size_t rows) noexcept |
| Set the maximum number of elements copied per call. | |
| void | set_memory_layout (MemoryLayout) override |
| Layout changes are not supported for packed composite elements. | |
| void | set_region_data (const Region ®ion, const std::vector< CompositeArray > &data) override |
| Replace a Region with an equal number of compatible elements. | |
| void | set_structure (ContainerDataStructure structure) override |
| Replace dimensional metadata. | |
| std::optional< CompositeSlice > | slice (const Region ®ion) const |
| Borrow elements selected by a one-dimensional Region. | |
| std::optional< CompositeSlice > | slice (size_t start, size_t count) const |
| Borrow consecutive elements without copying. | |
| DataFieldTraversal< CompositeArray > | traverse (size_t batch_size=1) const noexcept |
| Create an independent traversal over elements. | |
| void | unload_region (const Region &) override |
| Elements remain resident until clear() is called. | |
| std::type_index | value_element_type () const override |
| Composite elements have no single scalar value type. | |
| ~CompositeContainer () override | |
Public Member Functions inherited from MayaFlux::Kakshya::NDDataContainer< CompositeArray > | |
| auto | get_frame (uint64_t frame_index) const -> FrameView |
| Get a single frame of data efficiently. | |
| auto | get_frame_as (uint64_t frame_index) const -> std::span< const ValueT > |
| Get a single frame of data as a typed span. | |
| void | get_frames (std::span< ValueT > output, uint64_t start_frame, uint64_t num_frames) const |
| Get multiple frames efficiently. | |
| void | get_frames_as (std::vector< ValueT > &output, uint64_t start_frame, uint64_t num_frames) const |
| Get multiple frames efficiently as a typed span. | |
| ValueT | get_value_at (const std::vector< uint64_t > &coordinates) const |
| Read a single element at the given N-dimensional coordinates. | |
| void | set_value_at (const std::vector< uint64_t > &coordinates, ValueT value) |
| Write a single element at the given N-dimensional coordinates. | |
| virtual | ~NDDataContainer ()=default |
Protected Member Functions | |
| auto | get_frame_span_impl (uint64_t) const -> DataSpanVariant override |
| No frame span is available for composite elements. | |
| void | get_frames_impl (void *, size_t, uint64_t, uint64_t, const std::type_info &) const override |
| No frame copies are available for composite elements. | |
| void | get_value_impl (const std::vector< uint64_t > &, void *, const std::type_info &) const override |
| Read fields through Composite::get() or Composite::text(). | |
| void | set_value_impl (const std::vector< uint64_t > &, const void *, const std::type_info &) override |
| Write fields through CompositeInsertion. | |
Private Attributes | |
| size_t | m_batch_size |
| CompositeArray | m_data |
| CompositeArray | m_materialized_data |
| size_t | m_next_element {} |
| std::unordered_map< std::string, RegionGroup > | m_region_groups |
| ContainerDataStructure | m_structure { DataModality::TENSOR_ND, OrganizationStrategy::INTERLEAVED } |
Owns composite data and a bounded, independently owned window.
Elements share one CompositeLayout and remain packed in the two NDData-backed stores of CompositeArray. Insertion, slices, and traversals operate directly on that array. materialize_next() copies a bounded selection into a second CompositeArray, rebasing selected text offsets into its own text store. Each traversal owns its own position and window size.
Specializes NDDataContainer<CompositeArray> directly, not SignalSourceContainer, so it carries no ProcessingState and no DataProcessor attach/detach lifecycle. On-demand, non-recurring access goes through DataFieldTraversal<CompositeArray> instead, obtained via traverse().
Usage:
Definition at line 47 of file CompositeContainer.hpp.