IMSL C# Numerical Library

PrintMatrixFormat.Format Method 

Returns a formatted string. This method is used by the methods Print and PrintHTML. This method can be overridden to gain finer control over printing.

public virtual string Format(
   FormatType type,
   object entry,
   int row,
   int col,
   ParsePosition pos
);

Parameters

type
The type of string requested. See PrintMatrixFormat.FormatType Enumeration.
entry
The entry to be formatted. This is only used if type equals Entry. For other values of type, this can be set to null.
row
The (0-based) row number of the element to be formatted. This is -1 if there is no row number associated with this request.
col
The (0-based) column number of the element to be formatted. This is -1 if there is no column number associated with this request.
pos
A ParsePosition object used to indicate the alignment center of the return string. This is used only if type is Entry.

Return Value

A String to be put into the printed table.

Remarks

Note, if type is not FormatType.Entry, pos will be set based on the following criteria.

entry behavior
doubleThe index is the position of the decimal point.
intThe index is the position of the end of the formatted integer.

See Also

PrintMatrixFormat Class | Imsl.Math Namespace | PrintMatrixFormat.FormatType