com.waltermilner.complex

## Class ComplexFunction

• java.lang.Object
• com.waltermilner.complex.ComplexFunction

• ```public abstract class ComplexFunction
extends java.lang.Object```
This abstract class models a function of a complex variable. Concrete subclasses need to implement eval
• ### Constructor Summary

Constructors
Constructor and Description
`ComplexFunction()`
• ### Method Summary

Methods
Modifier and Type Method and Description
`Complex` ```circleIntegral(Complex centre, double radius)```
The numerical integral of the function over a circle.
`boolean` `cr(Complex z0)`
Does the function satisfy the Cauchy-Riemann conditions at z = z0.
`Complex` `deriv(Complex z)`
The derivative.
`abstract Complex` `eval(Complex z)`
`abstract Complex` ```eval(double x, double y)```
`Complex` `integralOnPath(java.util.ArrayList<Complex> path)`
Integral over a path which is a sequence of straight line segments Th path should be an arraylist of points in the z plane, which is interpreted as a set of vertices of straight line segments.
`boolean` `isContinuous(Complex z)`
Is the function continuous at a given z? A numerical test as to whether the function is continuous
`Complex` ```lineIntegral(Complex from, Complex to)```
Numerical approximation to a line integral.
`java.lang.String` `toString()`
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`
• ### Constructor Detail

• #### ComplexFunction

`public ComplexFunction()`
• ### Method Detail

• #### isContinuous

`public boolean isContinuous(Complex z)`
Is the function continuous at a given z? A numerical test as to whether the function is continuous
Parameters:
`z` - A z value
Returns:
true iff this function seems to be continuous at this z
• #### lineIntegral

```public Complex lineIntegral(Complex from,
Complex to)```
Numerical approximation to a line integral. The integral is calculated on the straight line from the start to the end points. It uses a form of the trapezium method
Parameters:
`from` - The start point
`to` - The end point
Returns:
The integral
• #### circleIntegral

```public Complex circleIntegral(Complex centre,
double radius)```
The numerical integral of the function over a circle. The path is followed in the positive counter-clockwise sense
Parameters:
`centre` - The centre of the circle
`radius` - The radius of the circle
Returns:
The integral over this path
• #### integralOnPath

`public Complex integralOnPath(java.util.ArrayList<Complex> path)`
Integral over a path which is a sequence of straight line segments Th path should be an arraylist of points in the z plane, which is interpreted as a set of vertices of straight line segments. The integral is totalled over the segments
Parameters:
`path` - The path
Returns:
The integral
• #### cr

`public boolean cr(Complex z0)`
Does the function satisfy the Cauchy-Riemann conditions at z = z0. This tries to answer that by a numerical approximation
Parameters:
`z0` - A value for z
Returns:
true iff the function satisfies the Cauchy-Riemann conditions
• #### deriv

`public Complex deriv(Complex z)`
The derivative. This is a numerical approximation. It will throw an exception if the function seems to be not differentiable
Parameters:
`z` - A z value to find the derivative at
Returns:
The derivative
• #### eval

`public abstract Complex eval(Complex z)`
• #### eval

```public abstract Complex eval(double x,
double y)```
• #### toString

`public java.lang.String toString()`
Overrides:
`toString` in class `java.lang.Object`