CoreWolf 1.3.4
dotnet add package CoreWolf --version 1.3.4
NuGet\Install-Package CoreWolf -Version 1.3.4
<PackageReference Include="CoreWolf" Version="1.3.4" />
paket add CoreWolf --version 1.3.4
#r "nuget: CoreWolf, 1.3.4"
// Install CoreWolf as a Cake Addin #addin nuget:?package=CoreWolf&version=1.3.4 // Install CoreWolf as a Cake Tool #tool nuget:?package=CoreWolf&version=1.3.4
CoreWolf
Overview
CoreWolf is an open-source C# library designed to seamlessly integrate the Wolfram Language into your software applications. Whether you use Mathematica, Wolfram Engine, Wolfram Script, Wolfram Kernel, Wolfram One, or Wolfram Alpha extensively, CoreWolf provides an easy and cross-platform solution.
Unlike the C# library NETLink developed by Wolfram, which is limited to the Windows platform, CoreWolf is developed in .NET Core, making it usable on Windows, Linux, macOS, and all other OSs supported by .NET Core.
Features
- Cross-Platform: Developed in .NET Core, compatible with Windows, Linux, macOS, and more.
- Extensive Integration: Access and utilize over 6500 built-in symbols of the Wolfram Engine.
- Ease of Use: Simplifies the syntax and command lexicon of the Wolfram Language for easier use.
Installation
Clone the repository and build the library using the following command:
git clone git@github.com:gttrcr/corewolf.git
cd corewolf
dotnet build -c Release
This will produce the CoreWolf/bin/Release/net8.0/CoreWolf.dll file, which can be imported into your project. Or download the package from nuget https://www.nuget.org/packages/CoreWolf.
Usage
Here are some examples demonstrating how to use CoreWolf in your projects.
usings
using CoreWolf; //Core library
using CoreWolf.Types; //Types namespace of the core library
Sum
Engine en = new(); //Get the instance of the engine
en.Execute("17 + 5"); // Execute a command
Console.WriteLine(en.Text); // The value of en.Text will be 22
The result of the computation is always in the Text
property of the Engine
class.
Expression Reduction
en.Execute("Sin[x]^2 + Cos[x]^2").Reduce();
Console.WriteLine(en.Text); // The value of en.Text is the boolean string 'True'
Exact Integration
en.Integrate("x^2", "{x, 2, 3}");
Numerical Integration
en.NIntegrate("x^E", "{x, 2, 3}");
Exact Integration and Numerical Evaluation
en.Integrate("x^2", "{x, 2, 3}");
en.N(); // This is equivalent to en.Integrate("x^2", "{x, 2, 3}").N();
Drawing and Exporting a Plot
en.Plot("Sqrt[Log[1 + x^2]]", "{x, Sin[3], 90}"); // Create a plot
en.Export("plot.jpg"); // Export the plot as a .jpg file
As always, you can concatenate every function. The previous example is equivalent to the following code
en.Plot("Sqrt[Log[1 + x^2]]", "{x, Sin[3], 90}").Export("plot.jpg");
Contribution
Contributions are welcome! Please open issues and submit pull requests to help improve CoreWolf.
Building a New Library
To build a new version of the CoreWolf library, follow these steps:
cd Scraper
# dotnet run Scraper
cd ../CoreWolf
rm -rf bin obj
cp ../README.md .
dotnet pack -c Release
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.