forked from rdotnet/rdotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuiltinFunction.cs
40 lines (37 loc) · 1.3 KB
/
BuiltinFunction.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
namespace RDotNet
{
/// <summary>
/// A built-in function.
/// </summary>
public class BuiltinFunction : Function
{
/// <summary>
/// Creates a built-in function proxy.
/// </summary>
/// <param name="engine">The engine.</param>
/// <param name="pointer">The pointer.</param>
protected internal BuiltinFunction(REngine engine, IntPtr pointer)
: base(engine, pointer)
{ }
/// <summary>
/// Invoke this builtin function, using an ordered list of unnamed arguments.
/// </summary>
/// <param name="args">The arguments of the function</param>
/// <returns>The result of the evaluation</returns>
public override SymbolicExpression Invoke(params SymbolicExpression[] args)
{
return InvokeOrderedArguments(args);
}
/// <summary>
/// NotSupportedException
/// </summary>
/// <param name="args">key-value pairs</param>
/// <returns>Always throws an exception</returns>
public override SymbolicExpression Invoke(IDictionary<string, SymbolicExpression> args)
{
throw new NotSupportedException();
}
}
}