Octave runtime for C#.
Proof of concept ,just a basic glue there is still much work to be done.
Licence:LGPL 3.0
Requirements: Windows .NET4.0 Client profile Octave VS2010 libs in PATH
How things work ,till now
Install Octave VS2010 version for Windows. Git clone. Setup Octave.Core include libs path to Octave directory. Compile an poof.
dynamic oi = Octave.Runtime.GetIntepreter();
Gets the dynamic object which is used to interop with Octave. Any method called against it will be called via Octave e.g.
double rnd= oi.rand()
var day =oi.gmtime(oi.time()).yday;
Controlling the number of return values.
var matrix = new[,] {{1.2, 1.3, 1.4}, {3.4, 5.6, 7.8},{1.7,9.1,8.4}};
var e = oi.eig(matrix,nargout:2);
double[,] evect=e[0];
double[,] eval=e[1];
Supported data types.
C# | Octave |
---|---|
System.Double | double |
System.Float | float |
System.(U)Int64 | (u)int64 |
System.(U)Int32 | (u)int32 |
System.(U)Int16 | (u)int16 |
System.SByte | int8 |
System.Byte | uint8 |
System.Boolean | bool |
System.String | string |
T[,] | Matrix |
System.Object[,] | Cell |
System.Dynamic.ExpandoObject | Struct |