|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.ObjectSubspace
class Subspace
This is the computational core of the package. It introduces subspaces and enables basic operations with them, using all the other classes for that.
| Constructor Summary | |
|---|---|
Subspace()
Constructs a null subspace. |
|
Subspace(Matrix A)
Constructs a subspace given in general form. |
|
Subspace(Point[] points,
Vector[] vectors)
Constructs a subspace given in parametric form (ie. from at least one point and potentially some vectors). |
|
| Method Summary | |
|---|---|
(package private) Cyclometric |
angle(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the angle of any two subspaces using the most efficient method. |
(package private) Cyclometric |
angleHyperplaneHyperplane(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the angle of two hyperplanes. |
(package private) Cyclometric |
angleLineAny(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the angle of a line and any other subspace. |
(package private) Cyclometric |
angleLineHyperplane(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the angle of a line and a hyperplane. |
(package private) Cyclometric |
angleLineLine(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the angle of two lines, ie. one-dimensional subspaces. |
(package private) Cyclometric |
angleUniversal(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the angle of two subspaces. |
(package private) void |
beautifyGeneral()
Multiplies individual equations by such numbers that their coefficients will be smallest possible integers. |
(package private) void |
beautifyParametric()
Multiplies individual vectors by such numbers that their coefficients will be smallest possible integers. |
(package private) void |
copy(Subspace S)
Copies the subspace. |
(package private) String |
describe(char label)
Properly describes the subspace. |
(package private) SquareRootFraction |
distance(Subspace W)
Calculates the distance of any two subspaces using the most efficient method. |
(package private) SquareRootFraction |
distance(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the distance of any two subspaces using the most efficient method. |
(package private) SquareRootFraction |
distanceFromParallelSubspace(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the distance of the subspace from a parallel subspace. |
(package private) SquareRootFraction |
distancePointAny(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the distance of a point from any subspace. |
(package private) SquareRootFraction |
distancePointHyperplane(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the distance of a point from a hyperplane. |
(package private) SquareRootFraction |
distancePointPoint(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the distance of two points. |
(package private) SquareRootFraction |
distanceUniversalUsingGram(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Calculates the distance of any two subspaces using Gram determinant. |
(package private) static Subspace |
generateRandomGeneralSubspace(int dim,
int DIM)
Generates a random subspace in general form. |
(package private) static Subspace |
generateRandomHyperplane(int DIM)
Generates a random hyperplane in general form. |
(package private) static Subspace |
generateRandomHyperplaneWithIntegerNorm(int DIM)
Generates a random hyperplane in general form. |
(package private) static Subspace |
generateRandomParametricSubspace(int dim,
int DIM)
Generates a random subspace in parametric form. |
(package private) static Subspace[] |
generateRandomSubspacesWithGivenAngle(int dim1,
int dim2,
int DIM,
PiFraction angle)
Generates two random subspaces in parametric form. |
(package private) static Subspace[] |
generateRandomSubspacesWithGivenDistance(int dim1,
int dim2,
int DIM,
Fraction dist)
Generates two random subspaces in general form. |
(package private) Matrix |
getAugMatrix()
Returns the augmented matrix of equation system generating this subspace. |
(package private) int |
getDim()
Returns the dimension of the subspace. |
(package private) int |
getDIM()
Returns the dimension of the whole space (number of variables). |
(package private) int |
getDim(boolean verbose)
Returns the dimension of the subspace. |
(package private) int |
getDim(boolean verbose,
char label)
Returns the dimension of the subspace. |
(package private) boolean |
getOriginalForm()
Makes clear if the subspace was originally input in general or in parametric form |
(package private) Matrix |
getVecMatrix()
Returns the matrix of direction vectors (in rows). |
(package private) void |
checkGeneralForm()
Checks if general form is already available; if it's not, it gets it. |
(package private) void |
checkGeneralForm(char label,
boolean verbose)
Checks if general form is already available; if it's not, it gets it. |
(package private) void |
checkParametricForm()
Checks if parametric form is already available; if it's not, it gets it. |
(package private) void |
checkParametricForm(char label,
boolean verbose)
Checks if parametric form is already available; if it's not, it gets it. |
(package private) Subspace |
intersectionDiffSpace(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose,
boolean noPriorKnowledge)
Finds intersection of difference spaces of two subspaces. |
(package private) boolean |
intersects(Subspace W)
Checks, if this subspace intersects with the other. |
(package private) boolean |
intersects(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
Checks, if this subspace intersects with the other. |
(package private) boolean |
isGeneralFormAvailable()
Confirms if the general form is available. |
(package private) boolean |
isNull()
Checks, if this subspace is a null space. |
(package private) boolean |
isParallel(Subspace W)
Checks, if this subspace is parallel to the other. |
(package private) boolean |
isParallel(Subspace W,
boolean verbose)
Checks, if this subspace is parallel to the other. |
(package private) boolean |
isParametricFormAvailable()
Confirms if the parametric form is available. |
(package private) Subspace |
orthogonalSupplement(char label,
boolean verbose)
Finds orthogonal supplement to a subspace. |
(package private) String |
toTeXGeneral()
Prints general form of this subspace formatted as TeX code. |
(package private) String |
toTeXGeneral(char variable)
Prints general form of this subspace formatted as TeX code. |
(package private) String |
toTeXParametric()
Prints parametric form of this subspace formatted as TeX code. |
(package private) String |
toTextGeneral()
Prints general form of this subspace formatted as text. |
(package private) String |
toTextGeneral(boolean verbose)
Prints general form of this subspace formatted as text. |
(package private) String |
toTextGeneral(boolean verbose,
char variable)
Prints general form of this subspace formatted as text. |
(package private) String |
toTextParametric()
Prints parametric form of this subspace formatted as text. |
(package private) String |
toTextParametric(boolean verbose)
Prints parametric form of this subspace formatted as text. |
| Methods inherited from class |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
Subspace()
Subspace(Matrix A)
A - augmented matrix of equation system generating this subspace
UnsupportedOperationException - Throws an exception if the equation system is not solvable, and thus cannot generate a subspace.
Subspace(Point[] points,
Vector[] vectors)
A - augmented matrix of equation system generating this subspace
IndexOutOfBoundsException - Throws an exception if no reference point was given.| Method Detail |
|---|
Cyclometric angle(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other subspaceverbose - determines, if the method “talks” (creates any text and TeX output)
Cyclometric that holds all information about the angle; most importantly, if the angle was any of 0, π/6, π/4, π/3, π/2, this value is marked
together with double value in radians
IllegalArgumentException - Throws an exception if the two subspaces do not come from the same space, ie. they have a different DIM.
Cyclometric angleHyperplaneHyperplane(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other hyperplaneverbose - determines, if the method “talks” (creates any text and TeX output)
Cyclometric that holds all information about the angle; most importantly, if the angle was any of 0, π/6, π/4, π/3, π/2, this value is marked
together with double value in radians
IllegalArgumentException - Throws an exception if any of the two subspaces is not a hyperplane in fact.
Cyclometric angleLineAny(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other subspaceverbose - determines, if the method “talks” (creates any text and TeX output)
Cyclometric that holds all information about the angle; most importantly, if the angle was any of 0, π/6, π/4, π/3, π/2, this value is marked
together with double value in radians
IllegalArgumentException - Throws an exception if this subspaces is not a line.
Cyclometric angleLineHyperplane(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the hyperplaneverbose - determines, if the method “talks” (creates any text and TeX output)
Cyclometric that holds all information about the angle; most importantly, if the angle was any of 0, π/6, π/4, π/3, π/2, this value is marked
together with double value in radians
IllegalArgumentException - Throws an exception if this subspaces is not a line or W is not a hyperplane.
Cyclometric angleLineLine(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other lineverbose - determines, if the method “talks” (creates any text and TeX output)
Cyclometric that holds all information about the angle; most importantly, if the angle was any of 0, π/6, π/4, π/3, π/2, this value is marked
together with double value in radians
IllegalArgumentException - Throws an exception if any of the two subspaces is not a line in fact.
Cyclometric angleUniversal(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other subspaceverbose - determines, if the method “talks” (creates any text and TeX output)
Cyclometric that holds all information about the angle; most importantly, if the angle was any of 0, π/6, π/4, π/3, π/2, this value is marked
together with double value in radiansvoid beautifyGeneral()
void beautifyParametric()
void copy(Subspace S)
S - subspace to be copiedString describe(char label)
SquareRootFraction distance(Subspace W)
W - the other subspace
IllegalArgumentException - Throws an exception if the two subspaces do not come from the same space, ie. they have a different DIM
SquareRootFraction distance(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other subspaceverbose - determines, if the method “talks” (creates any text and TeX output)
IllegalArgumentException - Throws an exception if the two subspaces do not come from the same space, ie. they have a different DIM
SquareRootFraction distanceFromParallelSubspace(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other subspace, parallel to this oneverbose - determines, if the method “talks” (creates any text and TeX output)
SquareRootFraction distancePointAny(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - any subspaceverbose - determines, if the method “talks” (creates any text and TeX output)
IllegalArgumentException - Throws an exception if this subspace is not a point.
SquareRootFraction distancePointHyperplane(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the hyperplaneverbose - determines, if the method “talks” (creates any text and TeX output)
IllegalArgumentException - Throws an exception if this subspace is not a point or W is not a hyperplane.
SquareRootFraction distancePointPoint(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other pointverbose - determines, if the method “talks” (creates any text and TeX output)
IllegalArgumentException - Throws an exception if one of the spaces is not a point.
SquareRootFraction distanceUniversalUsingGram(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other subspaceverbose - determines, if the method “talks” (creates any text and TeX output)
static Subspace generateRandomGeneralSubspace(int dim,
int DIM)
dim - dimension of the subspace (must be from [0, DIM))DIM - dimension of the superspace
IndexOutOfBoundsException - throws an exception if dim is not from [0, DIM)static Subspace generateRandomHyperplane(int DIM)
DIM - dimension of the superspace (ie. a number of variables)static Subspace generateRandomHyperplaneWithIntegerNorm(int DIM)
DIM - dimension of the superspace (ie. a number of variables)
static Subspace generateRandomParametricSubspace(int dim,
int DIM)
dim - dimension of the subspace (must be from [0, DIM))DIM - dimension of the superspace
IndexOutOfBoundsException - throws an exception if dim is not from [0, DIM)
static Subspace[] generateRandomSubspacesWithGivenAngle(int dim1,
int dim2,
int DIM,
PiFraction angle)
dim1 - dimension of the first subspace (must be from [0, DIM))dim2 - dimension of the second subspace (must be from [0, DIM))DIM - dimension of the superspaceangle - angle of the subspaces
IndexOutOfBoundsException - throws an exception if dim1 or dim2 is not from [0, DIM)
static Subspace[] generateRandomSubspacesWithGivenDistance(int dim1,
int dim2,
int DIM,
Fraction dist)
dim1 - dimension of the first subspace (must be from [0, DIM))dim2 - dimension of the second subspace (must be from [0, DIM))DIM - dimension of the superspacedist - distance of the subspaces
IndexOutOfBoundsException - throws an exception if dim1 or dim2 is not from [0, DIM)Matrix getAugMatrix()
int getDim()
int getDIM()
int getDim(boolean verbose)
verbose - determines, if the method “talks” (creates any text and TeX output)
int getDim(boolean verbose,
char label)
label - label of the subspaceverbose - determines, if the method “talks” (creates any text and TeX output)
boolean getOriginalForm()
Matrix getVecMatrix()
void checkGeneralForm()
void checkGeneralForm(char label,
boolean verbose)
verbose - determines, if the method “talks” (creates any text and TeX output)void checkParametricForm()
void checkParametricForm(char label,
boolean verbose)
verbose - determines, if the method “talks” (creates any text and TeX output)
Subspace intersectionDiffSpace(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose,
boolean noPriorKnowledge)
W - the other subspace
boolean intersects(Subspace W)
W - the other subspace
boolean intersects(Subspace W,
char firstLabel,
char secondLabel,
boolean verbose)
W - the other subspaceverbose - determines, if the method “talks” (creates any text and TeX output)
boolean isGeneralFormAvailable()
boolean isNull()
boolean isParallel(Subspace W)
W - the other subspace
boolean isParallel(Subspace W,
boolean verbose)
W - the other subspaceverbose - determines, if the method “talks” (creates any text and TeX output)
boolean isParametricFormAvailable()
Subspace orthogonalSupplement(char label,
boolean verbose)
verbose - determines, if the method “talks” (creates any text and TeX output)
String toTeXGeneral()
String toTeXGeneral(char variable)
variable - label of the variables
String toTeXParametric()
String toTextGeneral()
String toTextGeneral(boolean verbose)
verbose - determines if the output will be indented
String toTextGeneral(boolean verbose,
char variable)
verbose - determines if the output will be indentedvariable - label of the variables
String toTextParametric()
String toTextParametric(boolean verbose)
verbose - determines if the result shall contain full output (containing “xi = ”) = true; or short output (omitting “xi = ”) = false
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||