Code Monkey home page Code Monkey logo

rusymbols's Introduction

rusymbols

Note:

The resulting crate architecture does not correspond to the main ideas, therefore it will be reviewed and reassembled. Please wait for a more stable version

About

rusymbols is a Rust crate for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. rusymbols is written entirely in Rust.

(maybe some engineers want to learn Rust :))

The crate is designed to support the Rust language and add the ability to work with complex formulas at the speed of Rust, possibly slower than programmed without a high level of abstraction. Do not think about their solution, especially since there are formulas that change depending on the circumstances.The goal of the project is at least to become similar to SymPy.

Key ideas:

 - Simple.
 - Fast (maybe not at maximum speed, but still fast)
 - Safe
 - Universal (compatibility with nalgebra and standard types (possibly) and other similar crates)

How to use

 Just use it! The main idea is simplicity. Enjoy!

Example

use rusymbols::Expression;
use std::collections::HashMap;

let x = Expression::new_var("x");
let two = Expression::new_val(2.0);
let polynomial = x.clone().pow(two.clone()) - x + two;

let mut args: HashMap<&str, f64> = HashMap::new();
args.insert("x", 1.0);

assert_eq!(polynomial.to_string(), "x**2 - x + 2");
assert_eq!(polynomial.eval_args(&args).unwrap(), 2.0);

rusymbols's People

Contributors

simensgreen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rusymbols's Issues

add more actions

we need more actions that are useful like derivatives and integrals

Still under active development?

Sorry if this is considered a rude way to get in contact, but is this crate still under development? I'm new-ish to Rust, but I'm interested in Symbolic Computation, so I'd love to be involved.

Licensing: Please decide on a license.

Hello there! I understand that the crate is still under development, but having a licensed set up already can help with giving potential users security and could help them decide whether to use the crate or not.
Since you are inspired by SymPy, i would suggest looking into Permissive Licenses like the MIT or BSD Licenses, since SymPy apparently uses modified Versions of BSD.

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.