KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KnownValueInterpolator Class Reference

Interpolates known relative points along a track using linear distance. More...

#include <diff_phase_skew_tool.h>

Public Member Functions

 KnownValueInterpolator (const std::vector< KNOWN_RELATIVE_POINT > &pts)
 
std::optional< std::pair< double, double > > ValueAt (const double s)
 

Private Attributes

const std::vector< KNOWN_RELATIVE_POINT > & m_pts
 
std::size_t m_idx { 0 }
 

Detailed Description

Interpolates known relative points along a track using linear distance.

It is optimised to only support calling ValueAt with monotonically increasing values of s.

Definition at line 148 of file diff_phase_skew_tool.h.

Constructor & Destructor Documentation

◆ KnownValueInterpolator()

KnownValueInterpolator::KnownValueInterpolator ( const std::vector< KNOWN_RELATIVE_POINT > & pts)
inlineexplicit

Definition at line 151 of file diff_phase_skew_tool.h.

References m_pts.

Member Function Documentation

◆ ValueAt()

std::optional< std::pair< double, double > > KnownValueInterpolator::ValueAt ( const double s)
inline

Definition at line 156 of file diff_phase_skew_tool.h.

References EPS, m_idx, and m_pts.

Referenced by DIFF_PHASE_SKEW_TOOL::buildDiffOverlaySegments().

Member Data Documentation

◆ m_idx

std::size_t KnownValueInterpolator::m_idx { 0 }
private

Definition at line 203 of file diff_phase_skew_tool.h.

Referenced by ValueAt().

◆ m_pts

const std::vector<KNOWN_RELATIVE_POINT>& KnownValueInterpolator::m_pts
private

Definition at line 202 of file diff_phase_skew_tool.h.

Referenced by KnownValueInterpolator(), and ValueAt().


The documentation for this class was generated from the following file: