lamp.io.csv

package lamp.io.csv

This package provides methods to read CSV formatted data into STen tensors

The data is first read into to a regular JVM array, then transferred to off-heap memory. The total tensor size may be larger than what a single JVM array can hold.

Attributes

Members list

Value members

Concrete methods

def makeAsciiSilentCharsetDecoder: CharsetDecoder
def readDoubleFromChannel(channel: ReadableByteChannel, device: Device, cols: Seq[Int], fieldSeparator: Char, quoteChar: Char, recordSeparator: String, maxLines: Long, header: Boolean, charset: CharsetDecoder, bufferSize: Int)(implicit scope: Scope): Either[String, (Option[List[String]], STen)]
def readDoubleFromFile(file: File, device: Device, cols: Seq[Int], fieldSeparator: Char, quoteChar: Char, recordSeparator: String, maxLines: Long, header: Boolean, charset: CharsetDecoder, bufferSize: Int)(implicit scope: Scope): Either[String, (Option[List[String]], STen)]
def readFloatFromChannel(channel: ReadableByteChannel, device: Device, cols: Seq[Int], fieldSeparator: Char, quoteChar: Char, recordSeparator: String, maxLines: Long, header: Boolean, charset: CharsetDecoder, bufferSize: Int)(implicit scope: Scope): Either[String, (Option[List[String]], STen)]
def readFloatFromFile(file: File, device: Device, cols: Seq[Int], fieldSeparator: Char, quoteChar: Char, recordSeparator: String, maxLines: Long, header: Boolean, charset: CharsetDecoder, bufferSize: Int)(implicit scope: Scope): Either[String, (Option[List[String]], STen)]
def readFromChannel(scalarType: Byte, channel: ReadableByteChannel, device: Device, cols: Seq[Int], fieldSeparator: Char, quoteChar: Char, recordSeparator: String, maxLines: Long, header: Boolean, charset: CharsetDecoder, bufferSize: Int)(implicit scope: Scope): Either[String, (Option[List[String]], STen)]

Parse CSV files according to RFC 4180

Parse CSV files according to RFC 4180

Value parameters

cols

The column offsets to parse (if empty, parse everything)

fieldSeparator

The separator; default is comma

header

indicates whether the first line should be set aside

maxLines

The maximum number of records that will be read from the file. Includes header.

quoteChar

Within matching quotes, treat separChar as normal char; default is double-quote

recordSeparator

Record separator (line ending)

scalarType

4=Long, 6=Float, 7=Double

Attributes

def readFromFile(scalarType: Byte, file: File, device: Device, cols: Seq[Int], fieldSeparator: Char, quoteChar: Char, recordSeparator: String, maxLines: Long, header: Boolean, charset: CharsetDecoder, bufferSize: Int)(implicit scope: Scope): Either[String, (Option[List[String]], STen)]
def readLongFromChannel(channel: ReadableByteChannel, device: Device, cols: Seq[Int], fieldSeparator: Char, quoteChar: Char, recordSeparator: String, maxLines: Long, header: Boolean, charset: CharsetDecoder, bufferSize: Int)(implicit scope: Scope): Either[String, (Option[List[String]], STen)]
def readLongFromFile(file: File, device: Device, cols: Seq[Int], fieldSeparator: Char, quoteChar: Char, recordSeparator: String, maxLines: Long, header: Boolean, charset: CharsetDecoder, bufferSize: Int)(implicit scope: Scope): Either[String, (Option[List[String]], STen)]