SHiP Field Service
Framework-agnostic C++20 library exposing SHiP magnetic field maps.
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions
covfie_chains.h File Reference
#include <array>
#include <cmath>
#include <covfie/core/algebra/affine.hpp>
#include <covfie/core/backend/primitive/array.hpp>
#include <covfie/core/backend/transformer/affine.hpp>
#include <covfie/core/backend/transformer/clamp.hpp>
#include <covfie/core/backend/transformer/linear.hpp>
#include <covfie/core/backend/transformer/nearest_neighbour.hpp>
#include <covfie/core/backend/transformer/strided.hpp>
#include <covfie/core/field.hpp>
#include <covfie/core/field_view.hpp>
#include <covfie/core/parameter_pack.hpp>
#include <covfie/core/vector.hpp>
#include <cstddef>
#include <stdexcept>
#include <string>
#include <utility>
#include <variant>
Include dependency graph for covfie_chains.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ship::detail::GridSpec
 Axis-aligned grid: n[i] samples spanning [min[i], max[i]] (mm). More...
 

Namespaces

namespace  ship
 
namespace  ship::detail
 

Typedefs

using ship::detail::stored_backend_t = covfie::backend::strided< covfie::vector::size3, covfie::backend::array< covfie::vector::float3 > >
 
using ship::detail::reader_field_t = covfie::field< covfie::backend::affine< covfie::backend::clamp< covfie::backend::linear< stored_backend_t > > > >
 
using ship::detail::writer_field_t = covfie::field< covfie::backend::affine< covfie::backend::clamp< covfie::backend::nearest_neighbour< stored_backend_t > > > >
 

Functions

void ship::detail::validate (GridSpec const &spec)
 Throw if spec cannot produce a well-formed grid: every axis needs at least two samples (n - 1 underflows for n == 0 and divides by zero in grid_pos/the affine scale for n == 1) and a positive extent (max > min, otherwise the affine scale is non-positive or infinite).
 
float ship::detail::grid_pos (float min, float max, std::size_t n, std::size_t i)
 Position of sample i on an axis with n samples spanning [min, max].
 
writer_field_t ship::detail::make_writer_field (GridSpec const &spec)
 Build an empty writer-chain field over spec, ready to be filled via writer_field_t::view_t::at(x, y, z) at grid_pos sample positions.