Util

slash.matrix.Util
object Util

Attributes

Source
Util.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Util.type

Members list

Value members

Concrete methods

inline def fromString(inline content: String, delimiter: Char, n: Int): Mat[_ <: Int, _ <: Int]

Construct a matrix from delimited String rows.

Construct a matrix from delimited String rows.

Value parameters

delimiter

optional delimiter Char

lines

matrix String rows of delimited columns

n

number of rows to review for delimiter guess

Attributes

Returns

Mat[M,N]

Throws
IllegalArgumentException

All rows must have the same length

Source
Util.scala
def guessDelimiter(sampleText: String, ignoreErrors: Boolean): Char

Examine sample text to guess delimiter String. Provides a reasonably fast guess, but can potentially fail.

Examine sample text to guess delimiter String. Provides a reasonably fast guess, but can potentially fail.

Premise: choose the most frequently occurring candidate. priority if tied counts: comma, tab, pipe and semicolon. Ambiguous result returns empty string, unless @param ignoreErrors true.

Value parameters

ignoreErrors

ambiguity throws exception

sampleText

lines examined to estimate

src

inserted in exception error messages.

Attributes

Throws
sys.error

on ambigous results.

Source
Util.scala
def parseLine(line: String, delimiter: Char, quoteChar: Char): Iterator[String]

Examine sample text to guess delimiter String.

Examine sample text to guess delimiter String.

Value parameters

delimiter

delimiter Char

line

row of delimited column values

Attributes

Source
Util.scala
inline def string2double(s: String): Double

Attributes

Source
Util.scala