Package xal.tools.math.r3
Class ClosedBox
java.lang.Object
xal.tools.math.r3.ClosedBox
- All Implemented Interfaces:
Serializable
Represents a Cartesian box in R3.
- Since:
- Jan 27, 2003
- Author:
- Christopher K. Allen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor - creates an empty DomainR3 object to be initialized by the userClosedBox
(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) Initializing constructor - creates a new instance of DomainR3 according to the given parameters.ClosedBox
(ClosedInterval i1, ClosedInterval i2, ClosedInterval i3) Initializing constructor - creates a new instance of DomainR3 according to the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine whether or not point pt is member of the boundary of this set.centroid()
Compute the centroid of the domaindouble
diameter()
Computes the diameter of the domain.Compute the dimensions of the domainget1()
Get first dimension extentget2()
Get second dimension extentget3()
Get second dimension extentGet the maximum vertexGet the minimum vertexGet the x dimensionGet the y dimensionGet the z dimensionboolean
membership
(R3 pt) Determine whether point pt is an element of the domain.void
print
(PrintWriter os) Print out contents on an output streamvoid
println
(PrintWriter os) Print out contents on an output stream, terminate in newline characterdouble
volume()
Compute the volume of the domain.
-
Constructor Details
-
ClosedBox
public ClosedBox()Default constructor - creates an empty DomainR3 object to be initialized by the user -
ClosedBox
Initializing constructor - creates a new instance of DomainR3 according to the given parameters.- Parameters:
i1
- interval of definition in x dimensioni2
- interval of definition in y dimensioni3
- interval of definition in z dimension
-
ClosedBox
public ClosedBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) throws MathException Initializing constructor - creates a new instance of DomainR3 according to the given parameters. Not that the box is defined by the intervals [xmin,xmax] interval of definition in x dimension [ymin,ymax] interval of definition in y dimension [zmin,zmax] interval of definition in z dimension- Parameters:
xmin
- x dimension minimum valuexmax
- x dimension maximum valueymin
- y dimension minimum valueymax
- y dimension maximum valuezmin
- z dimension minimum valuezmax
- z dimension maximum value- Throws:
MathException
- one or more axis intervals are malformed (i.e., αmax < αmin, where α ∈ {x,y,z})
-
-
Method Details
-
get1
Get first dimension extent -
get2
Get second dimension extent -
get3
Get second dimension extent -
getXDimension
Get the x dimension -
getYDimension
Get the y dimension -
getZDimension
Get the z dimension -
getVertexMin
Get the minimum vertex -
getVertexMax
Get the maximum vertex -
membership
Determine whether point pt is an element of the domain.- Returns:
- true if pt is in domain
-
boundary
Determine whether or not point pt is member of the boundary of this set.- Returns:
- true if pt is a boundary element
-
centroid
Compute the centroid of the domain -
diameter
public double diameter()Computes the diameter of the domain. -
volume
public double volume()Compute the volume of the domain. -
dimensions
Compute the dimensions of the domain- Returns:
- (lx,ly,lz)
-
print
Print out contents on an output stream- Parameters:
os
- output stream receiving content dump
-
println
Print out contents on an output stream, terminate in newline character- Parameters:
os
- output stream receiving content dump
-