GithubHelp home page GithubHelp logo

tenso.rs's Introduction

Tensors

A (hopefully) fast math library for Rust, using BLAS bindings for computation. LAPACK bindings should be added in the near future.

As a side note, I have no idea if the name of this library is mathematically correct.

# Cargo.toml
[dependencies.tensors]

git = "https://github.com/mikkyang/tenso.rs.git"

Documentation

Cargo generated documentation.

Dependencies

  • Rust: Tensors is built on the nightly builds of the Rust repository.
  • BLAS: By default, Tensors links against the BLAS library on your system, using the -lblas flag.
  • LAPACK: By default, Tensors links against the LAPACK library on your system, using the -llapack flag. Note that at the moment, all of the LAPACK calls are Fortan based and expect column indexed memory.

Overview

Tensors provides high level wrappers for low level linear algebra operations.

Scalar types are the built-in ones: f32, f64, Complex32, Complex64.

Container types are Tensors specific: Vec, Mat.

There are also types to add attributes to these containers for transpose or Hermitian transpose operations.

For example, calculating dot product:

extern crate tensors;

use tensors::vec::Vec as TVec;
use tensors::Trans::T;

fn main() {
    let x = TVec::from_vec(vec![1f32, 2f32]);
    let y = TVec::from_vec(vec![-3f32, 1f32]);

    assert_eq!(&T(x) * &y, -1f32);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.