Package tools
Class ArrayTools
Object
ArrayTools
public class ArrayTools
extends Object
The
ArrayTools
class contains miscellaneous methods relating to arrays.-
Method Summary
Modifier and Type Method Description static GeneralFunction[]
append(GeneralFunction[] array, GeneralFunction element)
Appends aGeneralFunction
to aGeneralFunction[]
static GeneralFunction[]
deepClone(GeneralFunction[] functionArray)
Deep-clones aGeneralFunction
arraystatic GeneralFunction[]
distribute(GeneralFunction[] multiply, GeneralFunction[] add)
Returns aGeneralFunction[]
where every element in add is now aProduct
ofmultiply
and the function that was previously at its location inadd
static boolean
equalsSimplified(GeneralFunction[] first, GeneralFunction[] second)
static GeneralFunction[]
removeFunctionAt(GeneralFunction[] functionArray, int index)
Returns a copy of the input array with theGeneralFunction
at the specified index removed
-
Method Details
-
deepClone
Deep-clones aGeneralFunction
array- Parameters:
functionArray
- array of Functions- Returns:
- a deep-clone of the
GeneralFunction[]
-
removeFunctionAt
Returns a copy of the input array with theGeneralFunction
at the specified index removed- Parameters:
functionArray
- the array of GeneralFunctionsindex
- index of the function to be removed- Returns:
- the new array
-
distribute
Returns aGeneralFunction[]
where every element in add is now aProduct
ofmultiply
and the function that was previously at its location inadd
- Parameters:
multiply
- theGeneralFunction[]
which is distributed to every element inadd
add
- theGeneralFunction[]
which ismultiply
being distributed on to- Returns:
GeneralFunction[]
wheremultiply
has been distributed toadd
-
append
Appends aGeneralFunction
to aGeneralFunction[]
- Parameters:
array
- the array to be appended toelement
- the element to append- Returns:
- new combined
GeneralFunction[]
-
equalsSimplified
-