|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.mng.AbstractProcessManager
sbrt.shell.mng.geom.CdHarManager
public final class CdHarManager
This class is used to manage coordinate direction hit-and-run algorithms.
Field Summary | |
---|---|
static java.lang.String |
CONSTRAINT_TOLERANCE
The keyword used to denote the constraint tolerance. |
static double |
DEFAULT_CONSTRAINT_TOLERANCE
The default constraint tolerance. |
static double |
DEFAULT_MIN_CHORD_LENGTH
The default constraint tolerance. |
static java.lang.String |
INITIAL_POINT_FILE
The keyword used to denote the initial point file. |
static java.lang.String |
MAX_OBSTRUCTED_MOVES
The keyword used to denote the maximum number of obstructed moves to allow. |
static java.lang.String |
MIN_CHORD_LENGTH
The keyword used to denote the minimum chord length. |
static UnmodifiableSet<java.lang.String> |
optionalKeywords
The set of keywords understood, but not required, by this process manager. |
static java.lang.String |
PLANES_FILE
The keyword used to denote the name of the file containing the collection of sets. |
static java.lang.String |
POINTS_PER_POINT
The keyword used to denote the number of points generated for each point returned. |
static UnmodifiableSet<java.lang.String> |
requiredKeywords
The set of keywords required by this process manager. |
Fields inherited from class sbrt.shell.mng.AbstractProcessManager |
---|
ALGORITHM, COMPLETED, DATA_HEADERS, DEV_NULL, ELAPSED_TIME, FILE_FORMAT, INPUT_FILE, INPUT_FILE_FORMAT, INPUT_FILE_NAME_FILE, ITERATIONS, OUTPUT_FILE_FORMAT, OUTPUT_FILE_NAME, OUTPUT_FILE_NAME_FILE, PERCENT, PERCENT_COMPLETED, SEED, ZERO_CUTOFF |
Constructor Summary | |
---|---|
CdHarManager()
|
Method Summary | |
---|---|
void |
execute(java.io.PrintWriter out)
Executes the process this process manager controls and writes the results to the provided print writer. |
static double |
getConstraintTolerance(ManagerInput<java.lang.String,java.lang.String> input,
java.io.PrintWriter out)
Parses and returns the value for CONSTRAINT_TOLERANCE in the provided manager input. |
static java.util.Map<java.lang.String,java.lang.Double> |
getInitialPoint(ManagerInput<java.lang.String,java.lang.String> input,
java.io.PrintWriter out,
java.util.Set<java.lang.String> variables)
Opens the file with the name denoted by INITIAL_POINT_FILE and return the vector it contains. |
static java.util.Map<java.lang.String,java.lang.Double> |
getInitialPoint(java.lang.String fileName,
MapFormat<java.lang.String,java.lang.Double> format,
java.util.Set<java.lang.String> variables)
Opens the file with the provided name and return the vector it contains. |
static java.util.Map<java.lang.String,java.lang.Double> |
getInitialPoint(java.lang.String fileName,
java.io.PrintWriter out,
java.util.Set<java.lang.String> variables)
Opens the file with the provided name and return the vector it contains. |
static java.util.Map<java.lang.String,java.lang.Double> |
getInitialPoint(java.lang.String fileName,
java.util.Set<java.lang.String> variables)
Opens the file with the provided name and return the vector it contains. |
static int |
getMaxObstructedMoves(ManagerInput<java.lang.String,java.lang.String> input,
java.io.PrintWriter out)
Parses and returns the value for MAX_OBSTRUCTED_MOVES in the provided manager input. |
static double |
getMinChordLength(ManagerInput<java.lang.String,java.lang.String> input,
java.io.PrintWriter out)
Parses and returns the value for MIN_CHORD_LENGTH in the provided manager input. |
UnmodifiableSet<java.lang.String> |
getOptionalKeys()
Returns the set of keywords understood, but not required, by this process manager. |
static ComoFile<java.lang.String,java.lang.Double> |
getOutputFile(ManagerInput<java.lang.String,java.lang.String> input,
java.io.PrintWriter out,
java.util.Set<java.lang.String> headers)
Returns an output file with the name provided in the manager input. |
static ComoFile<java.lang.String,java.lang.Double> |
getOutputFile(java.lang.String fileName,
java.io.PrintWriter out,
java.util.Set<java.lang.String> headers)
Returns an output file with the provided name. |
static ComoFile<java.lang.String,java.lang.Double> |
getOutputFile(java.lang.String fileName,
java.util.Set<java.lang.String> headers)
Returns an output file with the provided name. |
static java.util.Set<ParallelHyperplanes<java.lang.String>> |
getPlanes(ManagerInput<java.lang.String,java.lang.String> input,
java.io.PrintWriter out)
Returns the list of sets contained in the file with the name contained in the provided input. |
static java.util.Set<ParallelHyperplanes<java.lang.String>> |
getPlanes(java.lang.String fileName)
Returns the list of sets contained in the file with the provided name. |
static java.util.Set<ParallelHyperplanes<java.lang.String>> |
getPlanes(java.lang.String fileName,
java.io.PrintWriter out)
Returns the list of sets contained in the file with the provided name. |
static int |
getPointsPerPoint(ManagerInput<java.lang.String,java.lang.String> input,
java.io.PrintWriter out)
Parses and returns the value for POINTS_PER_POINT in the provided manager input. |
CdHarProcess<java.lang.String> |
getProcess()
Returns the process controlled by this process manager. |
UnmodifiableSet<java.lang.String> |
getRequiredKeys()
Returns the set of keywords required by this process manager. |
static ApplicationException |
interpret(ExceededLimitException e)
Returns an ApplicationException whose message describes the error
that ocurred. |
static ApplicationException |
interpret(UnboundedVariableException e)
Returns an ApplicationException whose message describes the error
that ocurred. |
void |
setInput(ManagerInput<java.lang.String,java.lang.String> input,
java.io.PrintWriter out)
Uses the provided input to prepare this process manager for execution. |
Methods inherited from class sbrt.shell.mng.AbstractProcessManager |
---|
check, closeFile, closeRm, execute, getFileFormat, getFileFormat, getFileNameSource, getIterations, getSeed, getTextFileFormat, getTextFileFormat, getZeroCutoff, getZeroCutoff, parseInt, parseLong, printProgress, printProgress, printProgress, runProcess, setInput |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface sbrt.shell.mng.ProcessManager |
---|
check, execute, setInput |
Field Detail |
---|
public static final double DEFAULT_CONSTRAINT_TOLERANCE
public static final double DEFAULT_MIN_CHORD_LENGTH
public static final java.lang.String PLANES_FILE
public static final java.lang.String CONSTRAINT_TOLERANCE
public static final java.lang.String INITIAL_POINT_FILE
public static final java.lang.String MIN_CHORD_LENGTH
public static final java.lang.String POINTS_PER_POINT
public static final java.lang.String MAX_OBSTRUCTED_MOVES
public static final UnmodifiableSet<java.lang.String> requiredKeywords
public static final UnmodifiableSet<java.lang.String> optionalKeywords
Constructor Detail |
---|
public CdHarManager()
Method Detail |
---|
public static ApplicationException interpret(UnboundedVariableException e)
ApplicationException
whose message describes the error
that ocurred.
e
- an unbounded variable exception.
ApplicationException
wrapping the provided exception.public static ApplicationException interpret(ExceededLimitException e)
ApplicationException
whose message describes the error
that ocurred.
e
- an exceeded limit exception.
ApplicationException
wrapping the provided exception.public static java.util.Map<java.lang.String,java.lang.Double> getInitialPoint(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out, java.util.Set<java.lang.String> variables)
input
- the input containing a value for INITIAL_POINT_FILE
.out
- the print writer to which informative messages will be
written.variables
- the variables required to be present in the file.
FormatException
- if the file does not contain a required variable,
contains a single variable multiple times, or contains any other
formatting errors.public static java.util.Map<java.lang.String,java.lang.Double> getInitialPoint(java.lang.String fileName, java.io.PrintWriter out, java.util.Set<java.lang.String> variables)
fileName
- the name of the file containing the initial point, that is, vector.out
- the print writer to which informative messages will be written.variables
- the variables required to be present in the file.
FormatException
- if the file does not contain a required variable,
contains a single variable multiple times, or contains any other formatting errors.public static java.util.Map<java.lang.String,java.lang.Double> getInitialPoint(java.lang.String fileName, java.util.Set<java.lang.String> variables)
fileName
- the name of the file containing the initial point, that is, vector.variables
- the variables required to be present in the file.
FormatException
- if the file does not contain a required variable,
contains a single variable multiple times, or contains any other formatting errors.public static java.util.Map<java.lang.String,java.lang.Double> getInitialPoint(java.lang.String fileName, MapFormat<java.lang.String,java.lang.Double> format, java.util.Set<java.lang.String> variables)
fileName
- the name of the file containing the initial point, that is, vector.format
- the format object used to parse the file.variables
- the variables required to be present in the file.
FormatException
- if the file does not contain a required variable,
contains a single variable multiple times, or contains any other formatting errors.public static int getPointsPerPoint(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out)
input
- the input containing a value for POINTS_PER_POINT
.out
- the print writer to which a status message will be printed.
public static int getMaxObstructedMoves(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out)
input
- the input containing a value for
MAX_OBSTRUCTED_MOVES
.out
- the print writer to which a status message will be printed.
public static double getMinChordLength(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out)
input
- the input containing a value for MIN_CHORD_LENGTH
.out
- the print writer to which a status message will be printed.
public static double getConstraintTolerance(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out)
input
- the input containing a value for
CONSTRAINT_TOLERANCE
.out
- the print writer to which a status message will be printed.
public static java.util.Set<ParallelHyperplanes<java.lang.String>> getPlanes(java.lang.String fileName, java.io.PrintWriter out)
fileName
- the name of the file containing a list of sets.out
- the print writer to which status messages will be printed.
public static java.util.Set<ParallelHyperplanes<java.lang.String>> getPlanes(java.lang.String fileName)
fileName
- the name of the file containing a list of sets.
public static java.util.Set<ParallelHyperplanes<java.lang.String>> getPlanes(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out)
input
- the input containing the name of the file containing a list
of sets.out
- the print writer to which status messages will be printed.
public static ComoFile<java.lang.String,java.lang.Double> getOutputFile(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out, java.util.Set<java.lang.String> headers)
input
- the manager input containing the desired name of the output
file.out
- the print writer to which a status message will be printed.headers
- the variables whose values will be written to the output file.
public static ComoFile<java.lang.String,java.lang.Double> getOutputFile(java.lang.String fileName, java.io.PrintWriter out, java.util.Set<java.lang.String> headers)
fileName
- the desired name of the output file.out
- the print writer to which a status message will be printed.headers
- the variables whose values will be written to the output file.
public static ComoFile<java.lang.String,java.lang.Double> getOutputFile(java.lang.String fileName, java.util.Set<java.lang.String> headers)
fileName
- the desired name of the output file.headers
- the data headers.
public UnmodifiableSet<java.lang.String> getRequiredKeys()
getRequiredKeys
in interface ProcessManager<java.lang.String,java.lang.String>
public UnmodifiableSet<java.lang.String> getOptionalKeys()
getOptionalKeys
in interface ProcessManager<java.lang.String,java.lang.String>
public CdHarProcess<java.lang.String> getProcess()
getProcess
in interface KernelProcessManager<java.lang.String,java.lang.String>
public void setInput(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out)
setInput
in interface ProcessManager<java.lang.String,java.lang.String>
input
- all of the information required to prepare this process
manager for execution.out
- the print writer to which all messages will be printed.public void execute(java.io.PrintWriter out)
execute
in interface ProcessManager<java.lang.String,java.lang.String>
out
- the print writer where the results will be printed.
java.lang.IllegalStateException
- if no input was provided to this process
manager.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |