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

Contain functions that are used by multiple classes throughout the codebase More...

Static Public Member Functions

static string Proprocessing (Term[] term)
 Preprocessing function, used by Maxima(), various direct functions and takeover functions The cross product is masked because it generates error messages if it doesn't recognize it's arguments as vectors. More...
 
static void WriteDataToFile (string fullFilePath, string content)
 Create a file from a string More...
 
static float getScreenScaleFactor ()
 Get the scale factor of the current screen for windows form scaling More...
 
static string ReplaceUnicodeEscapeSequences (string input)
 Replace Unicode escape sequence into it's original form More...
 
static string ExtractUserPreamble (string input, out string userPreamble)
 Extract user preamble from string, save ít into a variable userPreamble. The user_preamble is removed from the input string More...
 
static string RemoveSysFromPreamble (string preamble)
 Converts SMath list, sys, to a string where preambles are separated by comma More...
 

Static Public Attributes

static string lastSMathGet = ""
 
static Term rootHold = null
 
static Term[][] argsHold = null
 
static Store contextHold = null
 
static Term[] resultHold = null
 
static bool initializingOverMenue = false
 
static PlotImage.PlotStore defaultPlotValues = new PlotImage.PlotStore()
 
static bool findFunction = false
 

Static Private Member Functions

static int FindCommaBeforeSecondLastIndex (string input, int startIndex)
 Converts SMath list, sys, to a string where preambles are separated by comma More...
 

Detailed Description

Contain functions that are used by multiple classes throughout the codebase

Member Function Documentation

◆ ExtractUserPreamble()

static string MaximaPlugin.SharedFunctions.ExtractUserPreamble ( string  input,
out string  userPreamble 
)
static

Extract user preamble from string, save ít into a variable userPreamble. The user_preamble is removed from the input string

Parameters
inputinput string
userPreamblevariable to save extracted user_preamble
Returns
Input string without user_preamble and extracted user_preamble

◆ FindCommaBeforeSecondLastIndex()

static int MaximaPlugin.SharedFunctions.FindCommaBeforeSecondLastIndex ( string  input,
int  startIndex 
)
staticprivate

Converts SMath list, sys, to a string where preambles are separated by comma

Parameters
inputinput string
startIndexstart index of "sys("
Returns
Position of the comma just before the second-to-last item

◆ getScreenScaleFactor()

static float MaximaPlugin.SharedFunctions.getScreenScaleFactor ( )
static

Get the scale factor of the current screen for windows form scaling

Returns
Float of scale factor. 100% scaling returns 1.0, 125% returns 1.25 and so on

◆ Proprocessing()

static string MaximaPlugin.SharedFunctions.Proprocessing ( Term[]  term)
static

Preprocessing function, used by Maxima(), various direct functions and takeover functions The cross product is masked because it generates error messages if it doesn't recognize it's arguments as vectors.

Parameters
termSMath expression
Returns
String representation of pre-processed expression

◆ RemoveSysFromPreamble()

static string MaximaPlugin.SharedFunctions.RemoveSysFromPreamble ( string  preamble)
static

Converts SMath list, sys, to a string where preambles are separated by comma

Parameters
preambleinput string
Returns
string where preamble is separated by comma

◆ ReplaceUnicodeEscapeSequences()

static string MaximaPlugin.SharedFunctions.ReplaceUnicodeEscapeSequences ( string  input)
static

Replace Unicode escape sequence into it's original form

Parameters
inputfile name
Returns
String with replaced unicode characters.

◆ WriteDataToFile()

static void MaximaPlugin.SharedFunctions.WriteDataToFile ( string  fullFilePath,
string  content 
)
static

Create a file from a string

Parameters
fullFilePathfile name
contentcontents

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