@danielsimonjr/mathts-core
v0.1.2
Published
Core types, utilities, and configuration for MathTS
Readme
@danielsimonjr/mathts-core
Core types, utilities, and configuration for MathTS.
Installation
npm install @danielsimonjr/mathts-coreUsage
import { createConfig, isNumeric, isMatrix, VERSION } from '@danielsimonjr/mathts-core';
// Create custom configuration
const config = createConfig({
backend: 'wasm',
autoBackend: true,
});
// Type guards
console.log(isNumeric(42)); // true
console.log(isMatrix([[1, 2], [3, 4]])); // trueAPI
Types
BackendType- Available backends:'js' | 'wasm' | 'gpu'NumericType- Numeric precision typesMathTSConfig- Configuration interface
Functions
createConfig(overrides?)- Create configuration with defaultsisNumeric(value)- Type guard for numbersisComplex(value)- Type guard for complex numbersisMatrix(value)- Type guard for matrices
License
MIT
