fitpack
Modern Fortran library for curve and surface fitting with splines
Loading...
Searching...
No Matches
fpPoint.hpp File Reference
#include "fitpack_core_c.h"
#include <array>
#include <cstddef>
#include <type_traits>
#include <vector>
Include dependency graph for fpPoint.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fpPoint< dims >
 A point in dims-dimensional space. More...
 
struct  fp_detail::fpPointLayout< dims >
 Instantiated at every zero-copy call site: the layout contract that makes the cast legal. More...
 

Namespaces

namespace  fp_detail
 

Functions

template<FP_SIZE dims>
constexpr bool operator== (const fpPoint< dims > &a, const fpPoint< dims > &b)
 
template<FP_SIZE dims>
constexpr bool operator!= (const fpPoint< dims > &a, const fpPoint< dims > &b)
 
template<FP_SIZE dims>
const FP_REAL * fpPointData (const std::vector< fpPoint< dims > > &points)
 Borrow a vector of points as a Fortran x(dims,m) buffer. No copy, no allocation.
 
template<FP_SIZE dims>
std::vector< FP_REAL > fpPointFlatten (const std::vector< fpPoint< dims > > &points)
 Flatten a vector of points into Fortran x(dims,m) order. One contiguous copy.
 
template<FP_SIZE dims>
std::vector< fpPoint< dims > > fpPointGather (const std::vector< FP_REAL > &flat)
 Rebuild a vector of points from a Fortran x(dims,m) buffer.
 

Function Documentation

◆ fpPointData()

template<FP_SIZE dims>
const FP_REAL * fpPointData ( const std::vector< fpPoint< dims > > & points)
inline

Borrow a vector of points as a Fortran x(dims,m) buffer. No copy, no allocation.

Returns
nullptr for an empty vector, as the C entry points expect.

◆ fpPointFlatten()

template<FP_SIZE dims>
std::vector< FP_REAL > fpPointFlatten ( const std::vector< fpPoint< dims > > & points)
inline

Flatten a vector of points into Fortran x(dims,m) order. One contiguous copy.

Here is the call graph for this function:

◆ fpPointGather()

template<FP_SIZE dims>
std::vector< fpPoint< dims > > fpPointGather ( const std::vector< FP_REAL > & flat)
inline

Rebuild a vector of points from a Fortran x(dims,m) buffer.

◆ operator!=()

template<FP_SIZE dims>
bool operator!= ( const fpPoint< dims > & a,
const fpPoint< dims > & b )
constexpr

◆ operator==()

template<FP_SIZE dims>
bool operator== ( const fpPoint< dims > & a,
const fpPoint< dims > & b )
constexpr