GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.FrameGenerationHRData.MathematicalFunctions module

class GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.FrameGenerationHRData.MathematicalFunctions.MathematicalFunctions[source]

Bases: object

A class containing 24 mathematical functions with various characteristics including continuous, discontinuous, descending, and constant segment behaviors. Domain: [-100, 100], Codomain: discrete values from [-1.0, 0.05, 0.1, 0.25, 0.5, 1.0, 1.5, 2.5, 3.5, 5.0, 7.5, 10.0, 20.0, 30.0]

__init__()[source]

Initialize the class with all 24 mathematical functions

get(function_name, x_start, x_end, length)[source]

Get y values from a specific function over a range of x values.

Parameters:

function_namestr

Name of the function to use (from self.function_names)

x_startfloat

Starting x value

x_end:

Ending x value

lengthint

Number of y values to return (determines x range)

Returns:

dictDictionary containing:
  • ‘x_values’: array of x values from x_start to x_start + length - 1

  • ‘y_values’: corresponding y values from the chosen function

  • ‘function_used’: name of the function used

Raises:

ValueError: If function_name is not valid or x values exceed domain bounds

list_functions()[source]

Return a list of all available function names