Code Monkey home page Code Monkey logo

exp4s's Introduction

Exp4s

Scala wrapper around Exp4j library. This is still under-development and more features to come. Read more about exp4j.

Maven co-ordinates / download

Exp4s is hosted only my personal github maintained repo server. Please find the below co-ordinates to usage.

current version 0.0.4

//moma -> my own maven archive :)
resolvers ++= Seq("moma" at "https://github.com/prassee/moma/raw/master/snapshots")
libraryDependencies ++= Seq("me.prassee" %% "exp4s" % "<current_version>")

Usage

  import Exp4sProcessor._

Step 2

  // a more idomatic way of doing
  // pass the formula , the variables followed by the values
  val x = forFormula("(sqrt(a^2) + sqrt(b^2))")("a", "b")(1, 2)
  println(x)

Step3

  // shortcut and simplified one  - formula followed by "with" keyword and variables and values as next set of params
  val compiledForm: Double = compileFormula("(sqrt(a^2) + sqrt(b^2)) with a,b", 1, 2)
  println(compiledForm)

@TODO

  • support for custom functions
  • support for async formula execution

License

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

exp4s's People

Contributors

prassee avatar

Stargazers

 avatar  avatar  avatar

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.