|
Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
|
Contiguous 2D matrix of element-pair bond cutoff ranges. More...
#include <AnalysisTypes.hpp>
Classes | |
| class | RowProxy |
| Mutable row proxy providing element access, span conversion, and compatibility resize. More... | |
| class | ConstRowProxy |
| Immutable row proxy providing element access and span conversion. More... | |
| class | RowIterator |
| Random-access iterator yielding RowProxy views for each row. More... | |
Public Types | |
| using | iterator = RowIterator<false> |
| using | const_iterator = RowIterator<true> |
Public Member Functions | |
| BondCutoffMatrix ()=default | |
| Default constructor creating an empty matrix. | |
| BondCutoffMatrix (size_t n) | |
| Constructs an n x n square matrix. | |
| BondCutoffMatrix (size_t rows, size_t cols, BondCutoffRange default_val={}) | |
| Constructs a matrix with specified dimensions and default value. | |
| BondCutoffMatrix (size_t rows, const std::vector< BondCutoffRange > &initial_row) | |
| Compatibility constructor replicating an initial row across all rows. | |
| BondCutoffMatrix (std::initializer_list< std::vector< BondCutoffRange > > list) | |
| Initializer-list constructor for 2D row initializers. | |
| size_t | size () const noexcept |
| size_t | rows () const noexcept |
| size_t | cols () const noexcept |
| bool | empty () const noexcept |
| void | clear () noexcept |
| Clears all elements, resetting matrix dimensions to zero. | |
| void | resize (size_t rows) |
| Resizes matrix rows, defaulting columns to rows if uninitialized. | |
| void | resize (size_t rows, const std::vector< BondCutoffRange > &initial_row) |
Compatibility resize replicating initial_row across all rows. | |
| void | resize (size_t rows, size_t cols, BondCutoffRange default_val={}) |
| Resizes matrix to specified dimensions. | |
| void | ensureCols (size_t new_cols) |
Ensures matrix has at least new_cols columns. | |
| RowProxy | operator[] (size_t row) noexcept |
| Accesses row via mutable RowProxy. | |
| ConstRowProxy | operator[] (size_t row) const noexcept |
| Accesses row via immutable ConstRowProxy. | |
| BondCutoffRange & | operator() (size_t row, size_t col) noexcept |
| Direct 2D mutable element accessor. | |
| const BondCutoffRange & | operator() (size_t row, size_t col) const noexcept |
| Direct 2D immutable element accessor. | |
| BondCutoffRange * | rowData (size_t row) noexcept |
| const BondCutoffRange * | rowData (size_t row) const noexcept |
| std::span< const BondCutoffRange > | flatSpan () const noexcept |
| std::span< BondCutoffRange > | flatSpan () noexcept |
| iterator | begin () noexcept |
| iterator | end () noexcept |
| const_iterator | begin () const noexcept |
| const_iterator | end () const noexcept |
| const_iterator | cbegin () const noexcept |
| const_iterator | cend () const noexcept |
| bool | operator== (const BondCutoffMatrix &other) const noexcept |
| Equality operator for BondCutoffMatrix. | |
Private Attributes | |
| size_t | rows_ {0} |
| size_t | cols_ {0} |
| std::vector< BondCutoffRange > | data_ |
Contiguous 2D matrix of element-pair bond cutoff ranges.
Stores cutoff ranges in a single cache-line-aligned flat buffer while providing RowProxy and std::span row views for seamless operator[i][j] indexing with zero heap fragmentation.
| using correlation::analysis::BondCutoffMatrix::iterator = RowIterator<false> |
|
default |
Default constructor creating an empty matrix.

|
inlineexplicit |
Constructs an n x n square matrix.
| [in] | n | Row and column count. |
|
inline |
Constructs a matrix with specified dimensions and default value.
| [in] | rows | Number of rows. |
| [in] | cols | Number of columns. |
| [in] | default_val | Initial value for all matrix entries. |

|
inline |
Compatibility constructor replicating an initial row across all rows.
| [in] | rows | Number of rows. |
| [in] | initial_row | Initial row vector to copy into every row. |

|
inline |
Initializer-list constructor for 2D row initializers.
| [in] | list | Initializer list of vector rows. |

|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |

|
inlinenodiscardnoexcept |

|
inlinenodiscardnoexcept |

|
inlinenoexcept |
Clears all elements, resetting matrix dimensions to zero.
|
inlinenodiscardnoexcept |

|
inlinenodiscardnoexcept |

|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |

|
inline |
Ensures matrix has at least new_cols columns.
| [in] | new_cols | Column count to set. |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
Direct 2D immutable element accessor.
| [in] | row | Zero-based row index. |
| [in] | col | Zero-based column index. |
|
inlinenodiscardnoexcept |
Direct 2D mutable element accessor.
| [in] | row | Zero-based row index. |
| [in] | col | Zero-based column index. |
|
inlinenoexcept |
Equality operator for BondCutoffMatrix.
| [in] | other | The other matrix to compare against. |

|
inlinenodiscardnoexcept |
Accesses row via immutable ConstRowProxy.
| [in] | row | Zero-based row index. |
|
inlinenodiscardnoexcept |
|
inline |
Resizes matrix rows, defaulting columns to rows if uninitialized.
| [in] | rows | New row count. |

|
inline |
Compatibility resize replicating initial_row across all rows.
| [in] | rows | New row count. |
| [in] | initial_row | Row to replicate. |

|
inline |
Resizes matrix to specified dimensions.
| [in] | rows | New row count. |
| [in] | cols | New column count. |
| [in] | default_val | Default value for populated cells. |

|
inlinenodiscardnoexcept |
row.
|
inlinenodiscardnoexcept |
row.
|
inlinenodiscardnoexcept |

|
inlinenodiscardnoexcept |

|
private |
|
private |
|
private |