44# include <type_traits>
47# include <gtest/gtest.h>
100 EXPECT_EQ(s.linear_index({ 2, 3 }), 11u);
146 s.
set(0, 0, 1); s.set(1, 1, 2); s.set(2, 2, 3);
157 const int *
pa = a.
data();
158 const int *
pb = b.data();
222 static_assert(std::is_const_v<std::remove_reference_t<
decltype(cv(0, 0))>>);
230 for (
ca_size_t i = 0; i < v.extent(0); ++i)
231 for (
ca_size_t j = 0; j < v.extent(1); ++j)
252 const int * p = a.
data();
287 (i == 1
and j == 2)
or (i == 3
and j == 3));
295 EXPECT_EQ(s.linear_index({ 2, 4 }), 14u);
331 s.
set(1, 1, 1,
true);
339 constexpr ca_size_t max = std::numeric_limits<ca_size_t>::max();
341 std::overflow_error);
Bit-packed row-major storage for N-dimensional binary CAs.
void fill(const bool value)
Set every cell to value.
ca_size_t size() const noexcept
static constexpr std::size_t dimension() noexcept
void swap(Bit_Cell_Storage &other) noexcept
Swap contents with another Bit_Cell_Storage instance.
void set(const coord_type &c, bool v)
Write the cell at coordinate c.
Row-major dense storage for N-dimensional cellular automata.
ca_size_t size() const noexcept
static constexpr std::size_t dimension() noexcept
view_type view() noexcept
Return a mutable Aleph::mdspan view of this storage.
const extents_type & extents() const noexcept
T at(const coord_type &c) const
Read access through a multi-index.
void set(const coord_type &c, const T &v)
Write access through a multi-index.
static constexpr std::size_t rank
Number of axes known at compile time.
__gmp_expr< typename __gmp_resolve_expr< T, V >::value_type, __gmp_binary_expr< __gmp_expr< T, U >, __gmp_expr< V, W >, __gmp_max_function > > max(const __gmp_expr< T, U > &expr1, const __gmp_expr< V, W > &expr2)
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
std::ptrdiff_t ca_index_t
Signed coordinate component used by lattices and neighborhoods.
std::size_t ca_size_t
Unsigned size component used for extents and counts.
Main namespace for Aleph-w library functions.
T & swap(T &t1, T &t2)
Generic swap using object's swap method.
and
Check uniqueness with explicit hash + equality functors.
void next()
Advance all underlying iterators (bounds-checked).
Bit-packed dense storage for boolean cellular automata.
C++20 concepts for the Cellular Automata module.
Dense, contiguous storage for cellular automata cells (1D/2D/3D).