PolyLink
A library to allow manipulation of geometry from within Mathematica
Main Page
Packages
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Properties
Vector.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections.Generic;
3
using
System.Linq;
4
using
System.Text;
5
using
System.Threading.Tasks;
6
using
Wolfram.NETLink;
7
8
namespace
PolyLink
9
{
10
public
struct
Vector
11
{
12
private
readonly
Expr
_expr;
13
14
public
Vector
(
Expr
expr) : this()
15
{
16
_expr = expr;
17
}
18
19
public
Expr
Expr
20
{
21
get
{
return
_expr; }
22
}
23
24
public
static
Vector
FromPoints
(
Expr
point1,
Expr
point2)
25
{
26
return
new
Vector
(
MSingle
.
Eval
(
"{1} - {0}"
, point1, point2));
27
}
28
29
public
Expr
Length
30
{
31
get
{
return
"Sqrt"
.MsBracket(
"Dot"
.MsBracket(
new
[] {_expr, _expr})); }
32
}
33
}
34
}
PolyLink.MSingle.Eval
static Expr Eval(String s, params object[] args)
Has the Mathematica Kernel evaluate a string, formatted to include the provided arguments ...
Definition:
MSingle.cs:66
PolyLink.Vector.Length
Expr Length
Definition:
Vector.cs:30
PolyLink.MSingle
A singleton object that communicates with the Mathematica kernel
Definition:
MSingle.cs:13
PolyLink.Vector.Vector
Vector(Expr expr)
Definition:
Vector.cs:14
PolyLink.Vector
Definition:
Vector.cs:10
PolyLink.Vector.Expr
Expr Expr
Definition:
Vector.cs:20
PolyLink.Vector.FromPoints
static Vector FromPoints(Expr point1, Expr point2)
Definition:
Vector.cs:24
DropBox
Dropbox
2013 REU
MathPolys
MathPolyLib
Vector.cs
Generated on Thu Nov 21 2013 10:10:31 for PolyLink by
1.8.5