npm.io
0.14.1 • Published 1 week ago

@danielsimonjr/mathts-core

Licence
MIT
Version
0.14.1
Deps
1
Size
430 kB
Vulns
0
Weekly
0

@danielsimonjr/mathts-core

Core types, utilities, and configuration for MathTS.

Installation

npm install @danielsimonjr/mathts-core

Usage

import { DEFAULT_CONFIG, isNumber, isMatrix, VERSION } from '@danielsimonjr/mathts-core';

// Default configuration
const config = { ...DEFAULT_CONFIG, backend: 'wasm' };

// Type guards
console.log(isNumber(42)); // true
console.log(
  isMatrix([
    [1, 2],
    [3, 4],
  ])
); // true

API

Types
  • BackendType - Available backends: 'js' | 'wasm' | 'gpu'
  • NumericType - Numeric precision types
  • MathTSConfig - Configuration interface
Functions
  • DEFAULT_CONFIG - Default configuration object
  • isNumber(value) - Type guard for numbers
  • isComplex(value) - Type guard for complex numbers
  • isMatrix(value) - Type guard for matrices

License

MIT

Keywords