IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Meta.Numerics.Interval Struct Reference

Represents an interval on the real number line. More...

Public Member Functions

bool OpenContains (double x)
 Determines whether the argument lies in the open interval. More...
 
bool ClosedContains (double x)
 Determines whether the argument lies in the closed interval. More...
 
override bool Equals (object obj)
 Determines whether a given object is an equal interval. More...
 
override int GetHashCode ()
 
override string ToString ()
 Produces a string representation of the interval. More...
 

Static Public Member Functions

static Interval FromEndpoints (double a, double b)
 Creates a new interval, given its endpoints. More...
 
static Interval FromEndpointAndWidth (double endpoint, double width)
 Creates a new interval, given its lower endpoint and width. More...
 
static Interval FromMidpointAndWidth (double midpoint, double width)
 Creates a new interval, given its midpoint and width. More...
 
static bool operator== (Interval i1, Interval i2)
 Determines whether two intervals are equal. More...
 
static bool operator!= (Interval i1, Interval i2)
 Determines whether two intervals are not equal. More...
 

Public Attributes

double b
 
double w
 

Properties

double LeftEndpoint [get]
 Gets the left (lower) endpoint of the interval. More...
 
double RightEndpoint [get]
 Gets the right (upper) endpoint of the interval. More...
 
double Width [get]
 Gets the width of the interval. More...
 
double Midpoint [get]
 Gets the mid-point of the interval. More...
 

Private Member Functions

 Interval (double a, double b, double w)
 

Private Attributes

double a
 

Detailed Description

Represents an interval on the real number line.

Use the static methods FromEndpoints, FromMidpointAndWidth, and FromEndpointAndWidth to instantiate intervals.

Constructor & Destructor Documentation

Meta.Numerics.Interval.Interval ( double  a,
double  b,
double  w 
)
inlineprivate

Member Function Documentation

bool Meta.Numerics.Interval.OpenContains ( double  x)
inline

Determines whether the argument lies in the open interval.

Parameters
xThe argument.
Returns
True if x lies in (a,b), otherwise False.

Referenced by Test.IntervalTest.IntervalOpenContains().

bool Meta.Numerics.Interval.ClosedContains ( double  x)
inline

Determines whether the argument lies in the closed interval.

Parameters
xThe argument.
Returns
True if x lies in [a,b], otherwise False.

Referenced by Test.MultiIntegrateTest.BallVolumeIntegrals(), Test.SampleTest.BetaFit(), Test.SampleTest.BetaFitUncertainty(), Test.BinaryContingencyTableTest.BinaryContingencyNullTest(), Test.BinaryContingencyTableTest.BinaryContingencyTest(), Test.BivariateSampleTest.BivariateLinearRegression(), Test.BivariateSampleTest.BivariatePolynomialRegression(), Test.ContingencyTableTest.ContingencyTableProbabilitiesAndUncertainties(), Test.MultiIntegrateTest.DoubleIntegrals(), Test.SampleTest.ExponentialFit(), Test.SampleTest.ExponentialFitUncertainty(), Test.DataSetTest.FitDataToLinearFunctionTest(), Test.DataSetTest.FitDataToLineTest(), Test.DataSetTest.FitDataToPolynomialTest(), Test.DataSetTest.FitDataToPolynomialUncertaintiesTest(), Test.DataSetTest.FitDataToProportionalityTest(), Test.DataSetTest.FitToFunctionPolynomialCompatibilityTest(), Test.SampleTest.GammaFit(), Test.SampleTest.GammaFitUncertainty(), Test.MultiIntegrateTest.GaussianIntegrals(), Test.IntervalTest.IntervalClosedContains(), Test.NullDistributionTests.KendallNullDistributionTest(), Test.NullDistributionTests.KolmogorovNullDistributionTest(), Test.NullDistributionTests.KuiperNullDistributionTest(), Test.BivariateSampleTest.LinearLogisticRegression(), Test.SampleTest.LognormalFit(), Test.MultivariateSampleTest.MultivariateLinearRegressionTest(), Test.MultivariateSampleTest.MultivariateNormalSummaryStatistics(), Test.SampleTest.NormalFit(), Test.SampleTest.NormalFitUncertainties(), Test.SampleTest.SampleKuiperTest(), Test.SampleTest.SampleMaximumLikelihoodFit(), Test.SampleTest.SampleMoments(), Test.SampleTest.SamplePopulationMomentEstimateVariances(), Test.MultiIntegrateTest.SeperableIntegrals(), Test.SampleTest.SignTestDistribution(), Test.NullDistributionTests.SpearmanNullDistributionTest(), Test.MultiIntegrateTest.SteinmetzVolume(), Test.SampleTest.TTestDistribution(), Test.NullDistributionTests.TwoSampleKolmogorovNullDistributionTest(), Test.SampleTest.WaldFitUncertainties(), Test.MultiIntegrateTest.WatsonIntegrals(), Test.SampleTest.WeibullFit(), Test.SampleTest.WeibullFitUncertainties(), and Test.MultiIntegrateTest.ZetaIntegrals().

static Interval Meta.Numerics.Interval.FromEndpoints ( double  a,
double  b 
)
inlinestatic

Creates a new interval, given its endpoints.

Parameters
aThe left (lower) endpoint of the interval.
bThe right (upper) endpoint of the interval.
Returns
The specified interval.

If width of the interval is very much smaller than its endpoint values, accuracy will be better maintained by constructing the interval using one endpoint and its width.

Referenced by Test.MultiExtremumTest.Ackley(), Test.AdvancedMathTest.AiryBairyIntegral(), Test.AdvancedMathTest.AiryIntegral(), Test.AdvancedMathTest.AiryIntegrals(), Test.OrthogonalPolynomialsTest.AssociatedLaguerreOrthonormality(), Test.OrthogonalPolynomialsTest.AssociatedLegendreOrthonormalityL(), Test.AdvancedMathTest.BesselJ0Integral(), Test.AdvancedMathTest.BesselKapteynIntegral(), Test.AdvancedMathTest.BesselLipshitzIntegral(), Test.AdvancedMathTest.BesselWeberIntegral(), Test.AdvancedMathTest.BesselY0Integral(), Test.AdvancedMathTest.BetaIntegral(), Test.MultiExtremumTest.Bukin(), Test.AdvancedMathTest.CatalanIntegralTest(), Test.AdvancedMathTest.ClausenIntegral(), Test.AdvancedMathTest.DawsonIntegralTest(), Test.AdvancedMathTest.DiLogExpIntegral(), Test.AdvancedMathTest.DiLogLogIntegral(), Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.DiscreteAsContinuousDistribution(), Test.DistributionTest.DistributionProbabilityIntegral(), Test.MultiExtremumTest.Easom(), Test.AdvancedMathTest.EllipticEIntegration(), Test.AdvancedMathTest.EllipticFIntegral(), Test.AdvancedMathTest.EllipticFIntegration(), Test.AdvancedMathTest.EllipticKCatalanIntegral(), Test.AdvancedMathTest.EllipticKIntegration(), Test.AdvancedMathTest.ErfcIntegral(), Test.AdvancedMathTest.ErfIntegralTest(), Meta.Numerics.Statistics.BinaryContingencyTable.FisherExactTest(), Test.DataSetTest.FitDataToLinearFunctionTest(), Test.DataSetTest.FitDataToLineChiSquaredTest(), Test.DataSetTest.FitDataToLineTest(), Test.DataSetTest.FitDataToPolynomialChiSquaredTest(), Test.DataSetTest.FitDataToPolynomialTest(), Test.DataSetTest.FitDataToProportionalityTest(), Test.DataSetTest.FitToFunctionLinearCompatibilityTest(), Test.DataSetTest.FitToFunctionPolynomialCompatibilityTest(), Test.AdvancedMathTest.FresnelCIntegralTest(), Test.AdvancedMathTest.FresnelSIntegralTest(), Test.IntervalTest.FromTest(), Test.AdvancedMathTest.GammaIntegral(), Test.MultiIntegrateTest.GaussianIntegrals(), Test.DistributionTest.GetDistributions(), Test.MultiExtremumTest.GoldsteinPrice(), Test.MultiExtremumTest.Griewank(), Test.OrthogonalPolynomialsTest.HermiteOrthonormality(), Test.AdvancedMathTest.IntegerBesselJIntegral(), Test.AdvancedMathTest.IntegralCiSiIntegrals(), Test.AdvancedMathTest.IntegralEIntegral(), Test.AdvancedMathTest.IntegralSiDefinition(), Meta.Numerics.Analysis.FunctionMath.Integrate(), Meta.Numerics.Analysis.MultiFunctionMath.Integrate(), Test.IntervalTest.IntervalClosedContains(), Test.IntervalTest.IntervalEndpoints(), Test.IntervalTest.IntervalFromEndpoints(), Test.IntervalTest.IntervalMidpoint(), Test.IntervalTest.IntervalOpenContains(), Test.IntervalTest.IntervalWidth(), Test.IntervalTest.IntervalZeroWidth(), Test.AdvancedMathTest.InverseErfIntegralTest(), Test.MultiIntegrateTest.IsingIntegrals(), Meta.Numerics.Statistics.BivariateSample.KendallTauTest(), Meta.Numerics.Statistics.Sample.KolmogorovSmirnovTest(), Test.OrthogonalPolynomialsTest.LaguerreOrthonormality(), Meta.Numerics.Statistics.Distributions.Distribution.LeftProbability(), Test.OrthogonalPolynomialsTest.LegendreOrthonormality(), Test.AdvancedMathTest.ModifiedBesselIntegralTest(), Meta.Numerics.Statistics.Distributions.DiscreteInterval.operator Interval(), Test.MultiExtremumTest.PackCirclesInCircle(), Test.MultiExtremumTest.PackCirclesInSquare(), Test.MultiExtremumTest.PackSpheresInCube(), Test.AdvancedMathTest.PolyGammaIntegral(), Test.AdvancedMathTest.PolyLogIntegration(), Test.PolynomialTest.PolynomialCalculus(), Test.AdvancedMathTest.RealBesselJIntegral(), Test.RootsTest.RootOfEi(), Test.RootsTest.RootOfJ0(), Test.SampleTest.SampleKolmogorovSmirnovTest(), Test.MultiExtremumTest.Schwefel(), Meta.Numerics.Statistics.BivariateSample.SpearmanRhoTest(), FutureTest.FutureTest.STA(), Test.MultiIntegrateTest.SymmetricUnitCube(), FutureTest.FutureTest.TestNormalOrderStatistic(), FutureTest.FutureTest.TestOldMinimization(), Test.MultiExtremumTest.ThompsonProblem(), Test.SpinTest.ThreeJLegendreIntegral(), Test.IntervalTest.ToTest(), Meta.Numerics.Statistics.Distributions.UniformDistribution.UniformDistribution(), Test.MultiIntegrateTest.UnitCube(), Test.MultiIntegrateTest.WatsonIntegrals(), Test.OrthogonalPolynomialsTest.ZernikeBessel(), and Test.OrthogonalPolynomialsTest.ZernikeOrthonormality().

static Interval Meta.Numerics.Interval.FromEndpointAndWidth ( double  endpoint,
double  width 
)
inlinestatic

Creates a new interval, given its lower endpoint and width.

Parameters
endpointThe left (lower) endpoint of the interval.
widthThe width of the interval.
Returns
The specified interval.
static Interval Meta.Numerics.Interval.FromMidpointAndWidth ( double  midpoint,
double  width 
)
inlinestatic

Creates a new interval, given its midpoint and width.

Parameters
midpointThe midpoint of the interval.
widthThe width of the interval.
Returns
The specified interval.

Referenced by Meta.Numerics.UncertainValue.ConfidenceInterval(), and Test.IntervalTest.IntervalFromMidpointAndWidth().

static bool Meta.Numerics.Interval.operator== ( Interval  i1,
Interval  i2 
)
inlinestatic

Determines whether two intervals are equal.

Parameters
i1The first interval.
i2The second interval.
Returns
True if i1 and i2 are equal, otherwise false.

References Meta.Numerics.Interval.a, and Meta.Numerics.Interval.w.

static bool Meta.Numerics.Interval.operator!= ( Interval  i1,
Interval  i2 
)
inlinestatic

Determines whether two intervals are not equal.

Parameters
i1The first interval.
i2The second interval.
Returns
True if i1 and i2 are not equal, otherwise false.
override bool Meta.Numerics.Interval.Equals ( object  obj)
inline

Determines whether a given object is an equal interval.

Parameters
objAn object.
Returns
True if obj is an equal Interval, otherwise false.
override int Meta.Numerics.Interval.GetHashCode ( )
inline
override string Meta.Numerics.Interval.ToString ( )
inline

Produces a string representation of the interval.

Returns
A string representation of the interval.

Member Data Documentation

double Meta.Numerics.Interval.a
private
double Meta.Numerics.Interval.b
double Meta.Numerics.Interval.w

Property Documentation

double Meta.Numerics.Interval.Midpoint
get

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