Package geomss.geom
Class GridSpacing
- java.lang.Object
-
- geomss.geom.GridSpacing
-
public class GridSpacing extends java.lang.Object
A collection of methods for creating various grid spacing options.Modified by: Joseph A. Huwaldt
- Version:
- January 30, 2017
- Author:
- Joseph A. Huwaldt, Date: June 26, 2009
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGridSpacing.GridTypeAn enumeration of the available grid spacing types.
-
Constructor Summary
Constructors Constructor Description GridSpacing()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.Double>acos(int n)Returns a list of values with an arc-cosine spacing between 0 and 1.static java.util.List<java.lang.Double>cos(int n)Returns a list of values with a cosine spacing between 0 and 1.static java.util.List<java.lang.Double>linear(int n)Returns a list of values evenly or linearly spaced between 0 and 1.static java.util.List<java.lang.Double>oneMinusSqrt(int n)Returns a list of values with a 1-square root spacing between 0 and 1.static java.util.List<java.lang.Double>sqr(int n)Returns a list of values with a squared spacing between 0 and 1.static java.util.List<java.lang.Double>sqrt(int n)Returns a list of values with a square root spacing between 0 and 1.static java.util.List<java.lang.Double>tanh(int n, double ds1, double ds2)Returns a list of values with a hyperbolic tangent spacing between 0 and 1.
-
-
-
Constructor Detail
-
GridSpacing
public GridSpacing()
-
-
Method Detail
-
linear
public static java.util.List<java.lang.Double> linear(int n)
Returns a list of values evenly or linearly spaced between 0 and 1.- Parameters:
n- The number of points to include in the spacing.- Returns:
- A list of points, of size
n, evenly spaced between 0 and 1.
-
cos
public static java.util.List<java.lang.Double> cos(int n)
Returns a list of values with a cosine spacing between 0 and 1. This distribution tends to group points near the ends of the list.- Parameters:
n- The number of points to include in the spacing.- Returns:
- A list of points, of size
n, with a cosine spacing between 0 and 1.
-
acos
public static java.util.List<java.lang.Double> acos(int n)
Returns a list of values with an arc-cosine spacing between 0 and 1. This distribution tends to group points near the middle of the list.- Parameters:
n- The number of points to include in the spacing.- Returns:
- A list of points, of size
n, with an arc-cosine spacing between 0 and 1.
-
sqrt
public static java.util.List<java.lang.Double> sqrt(int n)
Returns a list of values with a square root spacing between 0 and 1. This distribution tends to group points near the end of the list.- Parameters:
n- The number of points to include in the spacing.- Returns:
- A list of points, of size
n, with a square root spacing between 0 and 1.
-
oneMinusSqrt
public static java.util.List<java.lang.Double> oneMinusSqrt(int n)
Returns a list of values with a 1-square root spacing between 0 and 1. This distribution tends to group points near the start of the list.- Parameters:
n- The number of points to include in the spacing.- Returns:
- A list of points, of size
n, with a square root spacing between 0 and 1.
-
sqr
public static java.util.List<java.lang.Double> sqr(int n)
Returns a list of values with a squared spacing between 0 and 1. This distribution tends to group points near the start of the list.- Parameters:
n- The number of points to include in the spacing.- Returns:
- A list of points, of size
n, with a squared spacing between 0 and 1.
-
tanh
public static java.util.List<java.lang.Double> tanh(int n, double ds1, double ds2)
Returns a list of values with a hyperbolic tangent spacing between 0 and 1. This distribution tends to group points near the ends of the list depending on the inputs.- Parameters:
n- The number of points to include in the spacing.ds1- The fractional arc-length for the 1st segment at the start of the list.ds2- The fractional arc-length for the last segment at the end of the list.- Returns:
- A list of points, of size
n, with a hyperbolic tangent spacing between 0 and 1.
-
-