PolyLink
A library to allow manipulation of geometry from within Mathematica
 All Classes Namespaces Files Functions Variables Properties
MathHelper.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4 using System.Linq;
5 using System.Text;
6 using System.Threading.Tasks;
7 using Wolfram.NETLink;
8 
9 namespace PolyLink
10 {
11  public interface IExpressible
12  {
13  Expr AsExpr();
14  }
15 
16  public static class MathHelper
17  {
18 
24  public static object[] ToList(IEnumerable objects)
25  {
26  return objects.Cast<object>().ToArray();
27  }
28 
29  /*public static IEnumerable<Expr> CastToExpr<T>(IEnumerable<T> expressibles) where T : IExpressible
30  {
31  return expressibles.Select(c => c.AsExpr());
32  }*/
33 
34 
35  }
36 }