20#ifndef TRANSLINE_CALCULATIONS_TRANSLINE_CALCULATION_BASE_H 
   21#define TRANSLINE_CALCULATIONS_TRANSLINE_CALCULATION_BASE_H 
   25#include <unordered_map> 
  127    std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& 
GetAnalysisResults();
 
  130    std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& 
GetSynthesisResults();
 
  141    void InitProperties( 
const std::initializer_list<TRANSLINE_PARAMETERS>& aParams );
 
  172                            bool aRecalculateLength = 
false );
 
  213    static double coth( 
const double x ) { 
return ( std::exp( 2.0 * x ) + 1.0 ) / ( std::exp( 2.0 * x ) - 1.0 ); }
 
  216    static double sech( 
const double x ) { 
return 2.0 / ( std::exp( x ) + std::exp( -x ) ); }
 
  222    std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>> 
m_analysisStatus;
 
  225    std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>> 
m_synthesisStatus;
 
 
static double coth(const double x)
Calculates cosh of the given argument.
 
virtual bool Synthesize(SYNTHESIZE_OPTS aOpts)=0
Synthesis the transmission line using the current parameter set target.
 
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > & GetSynthesisResults()
Gets the output parameters following synthesis.
 
virtual void SetAnalysisResults()=0
Sets values in the output analysis results structure.
 
virtual void SetSynthesisResults()=0
Sets values in the output synthesis results structure.
 
double GetParameter(const TRANSLINE_PARAMETERS aParam) const
Gets the given calculation property.
 
static double sech(const double x)
Calculates sech of the given argument.
 
void InitProperties(const std::initializer_list< TRANSLINE_PARAMETERS > &aParams)
Initialises the properties used (as inputs or outputs) by the calculation.
 
static std::pair< double, double > EllipticIntegral(double arg)
Computes the complete elliptic integral of first kind K() and the second kind E() using the arithmeti...
 
void SetParameter(const TRANSLINE_PARAMETERS aParam, const double aValue)
Sets the given calculation property.
 
void SetSynthesisResult(TRANSLINE_PARAMETERS aParam, const double aValue, const TRANSLINE_STATUS aStatus=TRANSLINE_STATUS::OK)
Sets a synthesis result.
 
static constexpr double m_maxError
The maximum error for Z0 optimisations.
 
double SkinDepth() const
Calculate skin depth.
 
virtual void Analyse()=0
Analyses the transmission line using the current parameter set.
 
double & GetParameterRef(const TRANSLINE_PARAMETERS aParam)
Adds a constant to the given parameter.
 
std::unordered_map< TRANSLINE_PARAMETERS, double > m_parameters
All input and output properties used by the calculation.
 
bool MinimiseZ0Error1D(TRANSLINE_PARAMETERS aOptimise, TRANSLINE_PARAMETERS aMeasure, bool aRecalculateLength=false)
minimizeZ0Error1D
 
void SetAnalysisResult(TRANSLINE_PARAMETERS aParam, const double aValue, const TRANSLINE_STATUS aStatus=TRANSLINE_STATUS::OK)
Sets an analysis result.
 
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > m_synthesisStatus
Synthesis results.
 
virtual ~TRANSLINE_CALCULATION_BASE()
 
TRANSLINE_CALCULATION_BASE(std::initializer_list< TRANSLINE_PARAMETERS > aParameters)
Constructs the transmission line calculation object.
 
static double UnitPropagationDelay(double aEpsilonEff)
Calculates the unit propagation delay (ps/cm) for the given effective permittivity.
 
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > & GetAnalysisResults()
Gets the output parameters following analysis.
 
bool MinimiseZ0Error2D(TRANSLINE_PARAMETERS aParam1, TRANSLINE_PARAMETERS aParam2)
minimizeZ0Error2D
 
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > m_analysisStatus
Analysis results.
 
SYNTHESIZE_OPTS
Options for specifying synthesis inputs, targets, or strategies.
 
TRANSLINE_STATUS
Parameter status values.
 
TRANSLINE_PARAMETERS
All possible parameters used (as inputs or outputs) by the transmission line calculations.
 
@ TWISTEDPAIR_EPSILONR_ENV