RiptideRiptide
Download Riptide SDKInstall Riptorch
Menu
Raya docs

Every Raya maths method

The full reference for Riptide’s Raya maths libraries and Raya’s core libraries: every public class, function and method, with its signature and its documentation, generated from the source. Using PyTorch? The Riptorch reference covers every Riptorch API.

40libraries
1,080classes
8,698functions and methods

Core libraries

The language’s own libraries: strings, numbers, collections, async, typed data and SIMD, isolates, files and FFI.

Core types

raya:core

Strings, numbers, BigInt, booleans, lists, maps, sets, iterables, dates and durations, URIs, regular expressions, errors and exceptions. Imported automatically.

60 classes · 622 functions and methods · 503 examples

Basic maths and random numbers

raya:math

Constants, elementary functions, min and max, random numbers, points and rectangles.

4 classes · 36 functions and methods · 36 examples

JSON, UTF-8 and encodings

raya:convert

Codecs and converters: JSON, UTF-8, Latin-1, ASCII, Base64, HTML escaping and line splitting.

28 classes · 123 functions and methods · 110 examples

More collections

raya:collection

Hash, linked and splay-tree maps and sets, queues, linked lists, and list and map helpers.

23 classes · 338 functions and methods · 287 examples

Futures, streams and timers

raya:async

Future, Stream, stream controllers and transformers, Completer, Timer, zones and microtasks.

33 classes · 193 functions and methods · 185 examples

Typed data and SIMD

raya:typed_data

Typed lists and byte buffers, ByteData views, and the SIMD types Float32x4, Int32x4 and Float64x2.

23 classes · 224 functions and methods · 207 examples

Isolates

raya:isolate

Real parallel threads: Isolate.run, ports and capabilities.

8 classes · 48 functions and methods · 32 examples

Mutexes and condition variables

raya:concurrent

Synchronisation for memory shared between isolates.

2 classes · 6 functions and methods · 6 examples

Files, processes, sockets and HTTP

raya:io

Files and directories, processes, standard input and output, sockets, an HTTP client and server, and WebSockets.

106 classes · 598 functions and methods · 400 examples

Calling C (FFI)

raya:ffi

Pointers, native types, structs and unions, dynamic libraries, callbacks and native memory.

102 classes · 262 functions and methods · 202 examples

Numerical computing

Arrays and linear algebra

riptide_numerics_cpu

n-dimensional arrays with NumPy semantics: float16, bfloat16 and complex dtypes, views, slicing, broadcasting, ufuncs, reductions, matmul and einsum. BLAS levels 1–3, LU, Cholesky, LDLᵀ, QR, SVD, eigenvalues, Schur, least squares and matrix functions.

29 classes · 297 functions and methods · 250 examples

Calculus and solvers

riptide_numerics_calculus

Automatic differentiation, ODE solvers (explicit, stiff, symplectic, batched), B-spline, NURBS and RBF interpolation, quadrature, root finding and optimisation.

52 classes · 326 functions and methods · 283 examples

FFT and signal processing

riptide_numerics_signal

Mixed-radix and Bluestein FFT, real and n-D FFT, DCT, convolution, FIR and IIR filter design, windows, resampling and spectral analysis.

18 classes · 105 functions and methods · 96 examples

Sparse linear algebra

riptide_numerics_sparse

COO, CSR, CSC and BSR matrices, SIMD sparse products, Krylov solvers (CG, PCG, GMRES, BiCGSTAB, MINRES) with Jacobi, ILU(0) and IC(0) preconditioners, reorderings and sparse Cholesky.

21 classes · 81 functions and methods · 70 examples

Spatial structures

riptide_numerics_spatial

KD-trees, ball trees and BVHs, 2-D and 3-D convex hulls, Delaunay and Voronoi, k-nearest neighbours, point clouds and Morton codes.

13 classes · 82 functions and methods · 65 examples

Special functions

riptide_numerics_special

Gamma and beta (complete and incomplete), the erf family, Bessel J, Y, I and K, Airy, elliptic integrals, Legendre and spherical harmonics, zeta and hypergeometric functions, tested against SciPy and mpmath.

1 classes · 63 functions and methods · 63 examples

Statistics and random numbers

riptide_numerics_stats

Counter-based Philox and Threefry generators that give the same bits on the CPU and the GPU, distributions with pdf, cdf and ppf, descriptive statistics, regression, PCA and k-means.

22 classes · 142 functions and methods · 127 examples

GPU numerics

riptide_numerics_gpu

Dense and batched GEMM, Cholesky and LU, sparse products, random numbers and BVH queries as GPU compute kernels on Metal and Vulkan.

16 classes · 64 functions and methods

Tensors

riptide_tensor

A tensor API that records a graph, runs it on the CPU while you develop, and compiles it to GPU kernels. Riptorch’s engine grew from here.

23 classes · 130 functions and methods · 89 examples

Exact and higher mathematics

Arbitrary precision

riptide_precision

Exact rationals, binary floating point of any precision with correctly rounded operations, interval and ball arithmetic, and elementary and special functions to any precision.

15 classes · 387 functions and methods · 335 examples

Computer algebra

riptide_cas

Symbolic expressions, simplification, expansion and factorisation, differentiation, integration, series, multivariate polynomials, Gröbner bases, solving and LaTeX output.

26 classes · 374 functions and methods · 285 examples

Algebra and number theory

riptide_algebra

Permutation groups and character tables, Lie groups and algebras, Clifford algebras and spinors, quaternions and octonions, exact real algebraic numbers, primes, elliptic curves and modular forms.

49 classes · 845 functions and methods · 643 examples

Rational trigonometry

riptide_rational_geometry

Quadrance and spread instead of distance and angle, over the rationals and finite fields: the five main laws, conics, exact rotations, projective and universal hyperbolic geometry, chromogeometry and exact geometric predicates.

53 classes · 468 functions and methods · 426 examples

Algebraic calculus

riptide_algebraic_calculus

Calculus done exactly over the rationals and prime fields, with polynumbers and subderivatives, tangents with no limits, signed areas and quadratic curvature.

16 classes · 212 functions and methods · 149 examples

Exact special functions

riptide_rational_special

Special functions for rational trigonometry: spread polynomials, spread periods, the Cayley circle and spread series, next to their classic counterparts.

9 classes · 93 functions and methods · 86 examples

Differential geometry

riptide_geometry

Index-notation tensors, metrics and curvature by exact second-order differentiation, differential forms with wedge, d and Hodge star, discrete exterior calculus on meshes, and Lorentz and spinor transformations.

13 classes · 174 functions and methods · 150 examples

Topology

riptide_topology

Homology and cohomology over the integers and Z/p, persistent homology (Vietoris–Rips, alpha, cubical), mapper, discrete Morse theory and 3-manifolds.

28 classes · 179 functions and methods · 144 examples

Knot theory

riptide_knots

Link diagrams and Reidemeister moves, exact Jones, Alexander, Conway and HOMFLY-PT polynomials, and a table of small knots and links.

12 classes · 124 functions and methods · 99 examples

Gauge fields

riptide_rational_gauge

Superconductivity as a lattice Higgs model stepped by exact rational updates: U(1) links as rational unit complex numbers turned by Cayley maps, next to the classic angle form.

16 classes · 150 functions and methods · 172 examples

Lattice gauge theory

riptide_lattice

U(1) gauge symmetry as code, and lattice gauge theory for U(1), SU(2) and SU(3) with the Wilson action.

3 classes · 48 functions and methods · 50 examples

Geometry, physics and speed

Vectors, quaternions and matrices

riptide_math

Allocation-free vector, quaternion and matrix types over SIMD and typed data, spherical harmonics and low-discrepancy sequences.

77 classes · 697 functions and methods · 623 examples

The CPU matrix unit

riptide_matrix

Matrix multiply on the matrix unit (SME on M4, M5 and A18; a portable path elsewhere) for float32, exact int8 → int32 and int16 → int64.

1 classes · 5 functions and methods · 3 examples

SIMD helpers

riptide_simd

SIMD helpers over Float32x4, Int32x4 and Float64x2 that compile to single NEON instructions on arm64.

6 classes · 105 functions and methods · 99 examples

Arrays of value-class structs

riptide_struct

StructList: a fixed-length list of value-class instances stored contiguously, with no per-element objects.

1 classes · 7 functions and methods · 5 examples

Physics

riptide_physics

Rigid bodies with contacts and joints, cloth and soft bodies, SPH and stable fluids, finite elements and heat, orbital mechanics and typed units.

66 classes · 355 functions and methods · 277 examples

Quantum mechanics

riptide_rational_quantum

The Schrödinger equation stepped exactly over the Gaussian rationals, so probability is conserved exactly, rational SU(2) spin rotors and entanglement.

32 classes · 248 functions and methods · 238 examples

Relativity

riptide_rational_relativity

Special relativity as red geometry with exact velocity composition, and light and orbits around a black hole traced with only + − × ÷.

17 classes · 114 functions and methods · 74 examples

Conics and quadrics

riptide_conics

Conics and quadrics exactly over the rationals: cone sections, Dandelin spheres, foci and directrices.

19 classes · 157 functions and methods · 104 examples

Kepler orbits

riptide_kepler

Kepler orbits turned into a harmonic oscillator and stepped exactly, next to the classic leapfrog and Kepler-equation methods.

11 classes · 81 functions and methods · 46 examples

Vector search

riptide_vector_search

Nearest neighbours by cosine similarity beside exact search by spread, on the CPU and the GPU.

26 classes · 135 functions and methods

Plain-text versions for tools and AI assistants: llms.txt and llms-full.txt.