public final class NDPrintSettings
extends java.lang.Object
Tensor
instances ought to be converted to String
s.Constructor and Description |
---|
NDPrintSettings(java.util.function.Supplier<java.lang.Boolean> notModifiable) |
Modifier and Type | Method and Description |
---|---|
NDPrintSettings |
clone() |
int |
getCellSize()
A cell size refers to the number of characters reserved to
the
String representation of a single element. |
boolean |
getHasDerivatives() |
boolean |
getHasGradient() |
boolean |
getHasRecursiveGraph() |
boolean |
getHasShape() |
boolean |
getHasSlimNumbers() |
boolean |
getHasValue() |
java.lang.String |
getIndent() |
boolean |
getIsCellBound() |
boolean |
getIsLegacy()
This flag determines the usage of bracket types,
where
"[1x3]:(1, 2, 3)" would be the legacy version
of "(1x3):[1, 2, 3]" . |
boolean |
getIsMultiline() |
boolean |
getIsScientific() |
java.lang.String |
getPostfix() |
java.lang.String |
getPrefix() |
int |
getRowLimit()
Very large tensors with a rank larger than 1 might take a lot
of vertical space when converted to a
String . |
NDPrintSettings |
setCellSize(int cellSize)
A cell size refers to the number of characters reserved to
the
String representation of a single element. |
NDPrintSettings |
setHasDerivatives(boolean hasDerivatives) |
NDPrintSettings |
setHasGradient(boolean hasGradient) |
NDPrintSettings |
setHasRecursiveGraph(boolean hasRecursiveGraph) |
NDPrintSettings |
setHasShape(boolean hasShape) |
NDPrintSettings |
setHasSlimNumbers(boolean haveSlimNumbers) |
NDPrintSettings |
setHasValue(boolean hasValue) |
NDPrintSettings |
setIndent(java.lang.String indent) |
NDPrintSettings |
setIsCellBound(boolean isCellBound) |
NDPrintSettings |
setIsLegacy(boolean legacy)
This flag determines the usage of bracket types,
where
"[1x3]:(1, 2, 3)" would be the legacy version
of "(1x3):[1, 2, 3]" . |
NDPrintSettings |
setIsMultiline(boolean isMultiline) |
NDPrintSettings |
setIsScientific(boolean isScientific) |
NDPrintSettings |
setPostfix(java.lang.String postfix) |
NDPrintSettings |
setPrefix(java.lang.String prefix) |
NDPrintSettings |
setRowLimit(int shortage)
Very large tensors with a rank larger than 1 might take a lot
of vertical space when converted to a
String . |
NDPrintSettings |
with(NDPrintSettings other) |
NDPrintSettings |
with(java.lang.String modes) |
public NDPrintSettings(java.util.function.Supplier<java.lang.Boolean> notModifiable)
public NDPrintSettings clone()
clone
in class java.lang.Object
public NDPrintSettings with(NDPrintSettings other)
public int getCellSize()
String
representation of a single element.
This property only becomes relevant when the getIsCellBound()
flag is set. This will then cause the width of the cell to be always
of the specified size.public NDPrintSettings setCellSize(int cellSize)
String
representation of a single element.
This property only becomes relevant when the getIsCellBound()
flag is set. This will then cause the width of the cell to be always
of the specified size.cellSize
- The width of the cell in terms of numbers of characters.public int getRowLimit()
String
.
This property is the maximum number of
matrix rows printed. It determines at which point the number of
rows ought to be pruned.String
representation of the tensor.public NDPrintSettings setRowLimit(int shortage)
String
.
This property is the maximum number of
matrix rows printed. It determines at which point the number of
rows ought to be pruned.shortage
- The maximum number of rows in the String
representation of the tensor.public boolean getHasGradient()
public NDPrintSettings setHasGradient(boolean hasGradient)
hasGradient
- The truth value determining if the tensor should also print its gradient.public boolean getIsScientific()
public NDPrintSettings setIsScientific(boolean isScientific)
isScientific
- The truth value determining if numeric values should be formatted in scientific notation.public boolean getIsMultiline()
public NDPrintSettings setIsMultiline(boolean isMultiline)
isMultiline
- The truth value determining if the tensor should be printed in one line or across multiple lines.public boolean getHasSlimNumbers()
public NDPrintSettings setHasSlimNumbers(boolean haveSlimNumbers)
haveSlimNumbers
- The truth value determining if numbers should be formatted more compactly (1.0 to 1).public boolean getHasValue()
String
representation.public NDPrintSettings setHasValue(boolean hasValue)
hasValue
- The truth value determining if the values of the tensor should be included in the String
representation.public boolean getHasShape()
String
.public NDPrintSettings setHasShape(boolean hasShape)
hasShape
- The truth value determining if the tensor should have its shape included in the String
.public boolean getHasRecursiveGraph()
String
representation of the
tensor should have its computation graph attached (if present).public NDPrintSettings setHasRecursiveGraph(boolean hasRecursiveGraph)
hasRecursiveGraph
- The truth value determining if the String
representation of the
tensor should have its computation graph attached (if present).public boolean getHasDerivatives()
public NDPrintSettings setHasDerivatives(boolean hasDerivatives)
public boolean getIsCellBound()
public NDPrintSettings setIsCellBound(boolean isCellBound)
public java.lang.String getPrefix()
String
which will be prepended at the beginning of a Tensor
string representation.public NDPrintSettings setPrefix(java.lang.String prefix)
prefix
- The String
which will be prepended at the beginning of a Tensor
string representation.public java.lang.String getPostfix()
String
which will be appended at the end of a Tensor
string representation.public NDPrintSettings setPostfix(java.lang.String postfix)
postfix
- The String
which will be appended at the end of a Tensor
string representation.public java.lang.String getIndent()
String
representation where
the getIsMultiline()
is set to true
.public NDPrintSettings setIndent(java.lang.String indent)
indent
- The indent step for a single level of nesting for
String
representation where
the getIsMultiline()
is set to true
.public boolean getIsLegacy()
"[1x3]:(1, 2, 3)"
would be the legacy version
of "(1x3):[1, 2, 3]"
.public NDPrintSettings setIsLegacy(boolean legacy)
"[1x3]:(1, 2, 3)"
would be the legacy version
of "(1x3):[1, 2, 3]"
.legacy
- The truth value determining the type of brackets used.public NDPrintSettings with(java.lang.String modes)
modes
- A String
in which letters will be translated to settings.NDPrintSettings
configuration based on the provided modes.