gonumberio

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2024 License: CC0-1.0 Imports: 4 Imported by: 0

README

Go array reader

Generic library for reading 1D, 2D and 3D arrays from a text file.

Documentation

Index

Constants

View Source
const (
	DefaultChunkSize int = 32768
)

Variables

This section is empty.

Functions

func ConvertBool

func ConvertBool(r *ByteReader) (bool, uint, error)

func ConvertByte

func ConvertByte(r *ByteReader) (byte, uint, error)

func ConvertFloat

func ConvertFloat[T constraints.Float](r *ByteReader) (T, uint, error)

func ConvertSigned

func ConvertSigned[T constraints.Signed](r *ByteReader) (T, uint, error)

func ConvertUnsigned

func ConvertUnsigned[T constraints.Unsigned](r *ByteReader) (T, uint, error)

func Read1D

func Read1D[T any](
	r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) ([]T, error)

func Read2D

func Read2D[T any](
	r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) ([][]T, error)

func Read3D

func Read3D[T any](
	r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) ([][][]T, error)

Types

type ByteReader

type ByteReader = ite.ByteReader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL