public class Pole : IEquatable<Pole>, IComparable<Pole>
Represents a function pole, where the y-value goes off to infinity or becomes undefined in some other way.

Constructors

Pole

#
public Pole(double domain0, double domain1)
Create a new pole from its domain.
domain0 (double)Start of pole domain.
domain1 (double)End of pole domain.

Pole

#
public Pole(double location, double domain0, double domain1)
Create a new pole.
location (double)Exact location of pole.
domain0 (double)Start of pole domain.
domain1 (double)End of pole domain.

Pole

#
public Pole(double location)
Create a pole with default domain.
location (double)Location of pole.

Fields

AbsoluteAccuracy

#
public const double AbsoluteAccuracy = 1E-06
Defines the absolute minimum width of a single pole.

DiscreteAccuracy

#
public const int DiscreteAccuracy = 512
Defines the relative minimum width (in adjacent double values or ULPs) of a single pole.

Maximum

#
public const double Maximum = 1000000
Any value higher than this is considered to be part of a pole.

Minimum

#
public const double Minimum = -1000000
Any value lower than this is considered to be part of a pole.

Properties

Domain0

#
public double Domain0 { get; }
Gets the start of the pole domain.

Domain1

#
public double Domain1 { get; }
Gets the end of the pole domain.

IsMinimal

#
public bool IsMinimal { get; }
Gets whether this pole domain can be shrunk further without hitting the cutoff.

Location

#
public double Location { get; }
Gets the exact x location of the pole.

Methods

CompareTo

#
public int CompareTo(Pole other)
Compare this pole to another.
other (Pole)

Equals

#
public override bool Equals(object obj)
Test for equality.
obj (object)
Object.Equals

Equals

#
public bool Equals(Pole other)
Test for equality.
other (Pole)

GetHashCode

#
public override int GetHashCode()
Gets the hash code for this pole.

ToString

#
public override string ToString()
Gets the string represenation of this pole.
Object.ToString

TryFindPoles

#
public static Pole[] TryFindPoles(Function function, double x0, double x1, double y0, double y1, int samples)
Try and find all poles within the given range. This method is slow, inaccurate and possibly incorrect and should only be used when it is unknown where any poles might occur.
function (Function)Function to sample.
x0 (double)Lower limit of domain within which to search for poles.
x1 (double)Upper limit of domain within which to search for poles.
y0 (double)Value below which the function is unlikely to venture unless there's a pole.
y1 (double)Value above which the function is unlikely to venture unless there's a pole.
samples (int)Number of initial samples. It must be high enough to not entirely miss the portion of each pole sticking out of the (y0, y1) codomain.
A collection of found poles.