Quick start

The following page is a short instruction for getting started with AngouriMath. You may also need to address the following resources:

Install for C# and F#

How to install from NuGet? Here are a few instructions how to use NuGet:

Packages you may want to install:
AngouriMath targets netstandard2.0, which implies that it will work for almost any target.

IMPORTANT
It is recommended to include prereleases to install the last version, even if it is a pre-release one.

If you want to use the last version, pushed to master, you will need to add MyGet as a nuget package source:
https://www.myget.org/F/angourimath/api/v3/index.json
<add key="myget" value="https://www.myget.org/F/angourimath/api/v3/index.json" />

Install for Jupyter

First, make sure to have installed Interactive for .NET: follow the instructions from the official repository.

The package to install is here:

To install it, we recommend .NET Interactive's syntax, as follows:
#r "nuget:AngouriMath.Interactive, *-*"
If you want to install the last vesion, pushed to master, you can install it in the following way:
#i "https://www.myget.org/F/angourimath/api/v3/index.json"
#r "nuget:AngouriMath.Interactive, 0.0.0-*"

Install for C++ (experimental)

Consuming from C++ is available for CMake.

1. Here you need to add a language requirement:

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FetchContent)
FetchContent_Declare(
AngouriMath
GIT_REPOSITORY https://github.com/asc-community/AngouriMathLab
GIT_TAG        origin/cpp-release
)
FetchContent_MakeAvailable(AngouriMath)
3. Add this function (which copies the lib to the executable) after you add an executable:
angourimath_to_executable(\${YOUR_EXECUTABLE_NAME})
See the example.

Hello, world!

To verify you have everything installed correctly, let us write a simple program, computing a derivative:

C# code:
using AngouriMath;
using System;
Entity expr = "x + sin(y x)";
Console.WriteLine(expr);
Console.WriteLine(expr.Differentiate("x"));
F# code:
open Core
open Functions
let expr = parse "x + sin(y x)"
printf "%O" expr
printf "\n"
printf "%O" (differentiate "x" expr)
Jupyter:
#r "nuget:AngouriMath.Interactive, *-*"
open Core
open Functions
let expr = parse "x + sin(y x)"
differentiate "x" expr
C++ code:
#include <AngouriMath.h>;
AngouriMath::Entity expr = "x + sin(y x)";
std::cout << expr.Differentiate("x");

What's next?

You can check examples and wiki. We also recommend joining our Discord chat, so that we could help and you can give a feedback. The full documentation is in the almanac. The repository (with the source code) is on GitHub.

2019-2021 Angouri · Project's repo · Site's repo · Octicons