public class MathHelpers
extends java.lang.Object
Constructor and Description |
---|
MathHelpers() |
Modifier and Type | Method and Description |
---|---|
static Vector |
add2Vectors(Vector v1,
Vector v2)
add scalar to a double vector
|
static Vector |
addScalar2Vectors(Vector v1,
double scalar)
add scalar to a double vector
|
static Vector |
mulScalarWithVectors(Vector v1,
double scalar)
add scalar to a double vector
|
static double |
multipleVectors(Vector v1,
Vector v2)
multiple two double vectors
|
static double |
sigmoid(double x)
Preform sigmoid functions
|
static Vector |
subtract2Vectors(Vector v1,
Vector v2)
add scalar to a double vector
|
public static double multipleVectors(Vector v1, Vector v2)
v1
- first vectorv2
- second vectorpublic static Vector addScalar2Vectors(Vector v1, double scalar)
v1
- vectorscalar
- scalarpublic static Vector mulScalarWithVectors(Vector v1, double scalar)
v1
- vectorscalar
- scalarpublic static Vector subtract2Vectors(Vector v1, Vector v2)
v1
- first vectorv2
- second vectorpublic static Vector add2Vectors(Vector v1, Vector v2)
v1
- first vectorv2
- second vectorpublic static double sigmoid(double x)
x
- value