Maxima Plugin
A SMath Plugin
Loading...
Searching...
No Matches
MaximaPlugin.Converter.ConvertToMaxima Class Reference

Static Public Member Functions

static string PrepareStringsForMaxima (string text)
 Replaces string constants to Maxima More...
 
static string PrepareTermsForMaxima (string text)
 Translate Smath string to Maxima string More...
 

Static Public Attributes

static bool convertingmx = true
 

Static Private Attributes

static Dictionary< string, string > constantsToMaxima
 
static Dictionary< string, string > symbolsToMaxima
 
static Dictionary< string, string > seperatorsToMaxima
 
static Dictionary< string, string > primeToRandom
 
static Dictionary< string, string > functionNamesToMaxima
 

Member Function Documentation

◆ PrepareStringsForMaxima()

static string MaximaPlugin.Converter.ConvertToMaxima.PrepareStringsForMaxima ( string  text)
static

Replaces string constants to Maxima

Parameters
textstring to translate
Returns
Translated string

◆ PrepareTermsForMaxima()

static string MaximaPlugin.Converter.ConvertToMaxima.PrepareTermsForMaxima ( string  text)
static

Translate Smath string to Maxima string

Parameters
textSmath expression
Returns
SMath expression

Member Data Documentation

◆ constantsToMaxima

Dictionary<string, string> MaximaPlugin.Converter.ConvertToMaxima.constantsToMaxima
staticprivate
Initial value:
= new Dictionary<string, string>
{
{ @"(?<=\W)(e)(?=\W)", "%e" },
{ @"(?<=\W)(i)(?=\W)", "%i" },
{ @"(?<=\W)(#)(?=\W)", "" },
{ @"(\w)#", "$1" + ControlObjects.Replacement.Sharp},
{ @"#(\w)", ControlObjects.Replacement.Sharp+"$1"},
{ @"π", "%pi" },
{ @"(\p{L}\w*)(\.)", "$1_%_" },
}

◆ functionNamesToMaxima

Dictionary<string, string> MaximaPlugin.Converter.ConvertToMaxima.functionNamesToMaxima
staticprivate
Initial value:
= new Dictionary<string, string>
{
{ @"\bint\‍(", "integrate(" },
{ @"\blog\‍(", "logb(" },
{ @"\bln\‍(", "log(" },
{ @"\blim\‍(", "limit(" },
{ @"\bsign\‍(", "signum(" },
{ @"\bdet\‍(", "determinant(" },
{ @"\bRe\‍(", "realpart(" },
{ @"\bIm\‍(", "imagpart(" },
{ @"\bnthroot\‍(", "ntewurzel(" },
{ @"\bround\‍(", "round2(" },
}

◆ primeToRandom

Dictionary<string, string> MaximaPlugin.Converter.ConvertToMaxima.primeToRandom
staticprivate
Initial value:
= new Dictionary<string, string>
{
{ @"([a-zA-Z]+)\s*'", "$1PRIME" },
}

◆ seperatorsToMaxima

Dictionary<string, string> MaximaPlugin.Converter.ConvertToMaxima.seperatorsToMaxima
staticprivate
Initial value:
= new Dictionary<string, string>
{
{ @"'diff\‍(", "diff("},
{ @"'([^\+\-*/])", "%unit$1" },
{ @"{", "(" },
{ @"}", ")" },
}

◆ symbolsToMaxima

Dictionary<string, string> MaximaPlugin.Converter.ConvertToMaxima.symbolsToMaxima
staticprivate
Initial value:
= new Dictionary<string, string>
{
{ @"(^|\W)(∞)($|\W)","$1inf$3" },
{ @"(^|\W)(\-∞)($|\W)","$1minf$3" },
{ @"±([^\+\-*/])+($|[\+\-*/\‍)\‍(]+)", "plusminus($1)$2" },
{ @"≡", "=" },
{ @"≤", " <= " },
{ @"≥", " >= " },
{ @"≠", " # " },
{ @"¬", " not " },
{ @"&", " and " },
{ @"\|", " or " },
{ @"¤", " not or " },
{ @"†", " ~ " },
}

The documentation for this class was generated from the following file: