Fit |
public class FitFunctionScript : AbstractScript, IFitFunctionScriptText, IScriptText, IPureScriptText, ICloneable, IFitFunction
The FitFunctionScript type exposes the following members.
| Name | Description | |
|---|---|---|
| FitFunctionScript | Creates an empty script. | |
| FitFunctionScript(FitFunctionScript) | Creates a column script as a copy from another script. | |
| FitFunctionScript(FitFunctionScript, Boolean) | Creates a column script as a copy from another script. |
| Name | Description | |
|---|---|---|
| AccumulatedEventData |
Gets the accumulated event data.
(Inherited from SuspendableDocumentLeafNodeWithSingleAccumulatedDataT) | |
| AssignmentRegionIndentation | Gets the indentation used in generated assignment regions. | |
| CodeEnd |
Gets the text inserted after the user code ends.
(Overrides AbstractScriptCodeEnd) | |
| CodeHeader |
Gets the code header, i.e. the leading script text. It depends on the ScriptStyle.
(Overrides AbstractScriptCodeHeader) | |
| CodeStart |
Gets the text inserted before the user code starts.
(Overrides AbstractScriptCodeStart) | |
| CodeTail |
Get the ending text of the script, dependent on the ScriptStyle.
(Overrides AbstractScriptCodeTail) | |
| CodeUserDefault |
Gets the default user code, for example a code sample.
(Overrides AbstractScriptCodeUserDefault) | |
| CreationTime | Date/Time of creating this fit function. | |
| Debug_AbsolutePath |
Gets the absolute path of the node for debugging purposes.
(Inherited from SuspendableDocumentNodeBase) | |
| DefinitionRegionIndentation | Gets the indentation used in generated definition regions. | |
| DependentAssignmentRegionCore | Gets the generated body of the dependent-variable assignment region. | |
| DependentAssignmentRegionEnd | Gets the end marker of the generated dependent-variable assignment region. | |
| DependentAssignmentRegionStart | Gets the start marker of the generated dependent-variable assignment region. | |
| DependentDeclarationRegionCore | Gets the generated body of the dependent-variable declaration region. | |
| DependentDeclarationRegionEnd | Gets the end marker of the generated dependent-variable declaration region. | |
| DependentDeclarationRegionStart | Gets the start marker of the generated dependent-variable declaration region. | |
| DependentDefinitionRegionCore | Gets the generated body of the dependent-variable definition region. | |
| DependentDefinitionRegionEnd | Gets the end marker of the generated dependent-variable definition region. | |
| DependentDefinitionRegionStart | Gets the start marker of the generated dependent-variable definition region. | |
| DependentVariablesNames | Sets the names of the dependent variables. | |
| Errors |
Returns the compiler errors as array of strings.
(Inherited from AbstractScript) | |
| FitFunctionCategory | Category of the fit function. If the fit function category contains PathSeparatorChars, than the parts of the string that are separated by these chars are treated as separate sub-categories. | |
| FitFunctionDescription | Descriptional text for that fit function. | |
| FitFunctionName | Name of the fit function. | |
| IndependentAssignmentRegionCore | Gets the generated body of the independent-variable assignment region. | |
| IndependentAssignmentRegionEnd | Gets the end marker of the generated independent-variable assignment region. | |
| IndependentAssignmentRegionStart | Gets the start marker of the generated independent-variable assignment region. | |
| IndependentDefinitionRegionCore | Gets the generated body of the independent-variable definition region. | |
| IndependentDefinitionRegionEnd | Gets the end marker of the generated independent-variable definition region. | |
| IndependentDefinitionRegionStart | Gets the start marker of the generated independent-variable definition region. | |
| IndependentVariablesNames | Sets the names of the independent variables. | |
| IsDirty |
True if the column script is dirty, i.e. the text changed since the last reset of IsDirty.
(Inherited from AbstractScript) | |
| IsDisposed |
Gets a value indicating whether this instance is disposed.
(Inherited from SuspendableDocumentNodeBase) | |
| IsDisposeInProgress |
Gets a value indicating whether for this instance dispose is in progress, or the instance is already disposed.
(Inherited from SuspendableDocumentNodeBase) | |
| IsReadOnly |
Returns true when the script text can not be modified. Use CloneForModification to
obtain a writable copy.
(Inherited from AbstractScript) | |
| IsSomeoneListeningToChanges |
Gets a value indicating whether someone is listening to changes. For this, either the ParentObject or the Changed event must be set.
(Inherited from SuspendableDocumentNodeBase) | |
| IsSuspended |
Gets a value indicating whether this instance is suspended.
(Inherited from SuspendableDocumentLeafNode) | |
| IsUsingUserDefinedParameterNames | Returns true if the script uses user defined parameter names instead of using P[0], P[1] ... | |
| Name |
Gets the name of this document node. Null is returned if the name is not set or unknown.
The set accessor will for most nodes throw a InvalidOperationException, since the name can only be set on IProjectItems.
(Inherited from SuspendableDocumentNodeBase) | |
| NumberOfDependentVariables | Number of dependent variables (i.e. y, in Altaxo this is commonly called v (like value)). | |
| NumberOfIndependentVariables | Number of independent variables (i.e. x). | |
| NumberOfParameters | Gets or sets the number of parameters. | |
| ParameterAssignmentRegionCore | Gets the generated body of the parameter-assignment region. | |
| ParameterAssignmentRegionEnd | Gets the end marker of the generated parameter-assignment region. | |
| ParameterAssignmentRegionStart | Gets the start marker of the generated parameter-assignment region. | |
| ParameterDefinitionRegionCore | Gets the generated body of the parameter-definition region. | |
| ParameterDefinitionRegionEnd | Gets the end marker of the generated parameter-definition region. | |
| ParameterDefinitionRegionStart | Gets the start marker of the generated parameter-definition region. | |
| ParentObject |
Gets/sets the parent object this instance belongs to.
(Inherited from SuspendableDocumentNodeBase) | |
| ScriptAssembly |
Gets the compiled script assembly, if compilation succeeded.
(Inherited from AbstractScript) | |
| ScriptName |
Gets the script file name.
(Inherited from AbstractScript) | |
| ScriptObject |
Gets the compiled script object, if available.
(Inherited from AbstractScript) | |
| ScriptObjectType |
Gives the type of the script object (full name), which is created after successfull compilation.
(Overrides AbstractScriptScriptObjectType) | |
| ScriptText |
Get / sets the script text
(Overrides AbstractScriptScriptText) | |
| ScriptTextHash |
Get the script text hash
(Inherited from AbstractScript) | |
| UserAreaScriptOffset |
Gets the index in the script (considered as string), where the
user area starts. This is momentarily behind the comment line
" ----- add your script below this line ------"
(Inherited from AbstractScript) | |
| UserDefinedParameterNames | Get / sets the user defined parameter names. If setting, this also sets the property IsUsingUserDefinedParameterNames to true, and the NumberOfParameters to the given number of user defined parameters. |
| Name | Description | |
|---|---|---|
| AccumulateChangeData |
Accumulates the change data of the child.
(Inherited from SuspendableDocumentLeafNodeWithEventArgs) | |
| AccumulatedChangeData_SetBackAfterResumeAndSuspend |
Sets the change data without further processing. This function is infrastructure and intended to use only in OnResume after the parent has suspended this node again.
(Inherited from SuspendableDocumentLeafNodeWithSingleAccumulatedDataT) | |
| AccumulatedEventData_Clear |
Clears the accumulated event data.
(Inherited from SuspendableDocumentLeafNodeWithSingleAccumulatedDataT) | |
| AccumulatedEventData_HasZeroOrOneEventArg |
Determines whether there is no or only one single event arg accumulated. If this is the case, the return value is true. If there is one event arg accumulated, it is returned in the argument singleEventArg.
The return value is false if there is more than one event arg accumulated. In this case the singleEventArg is null on return, and the calling function should use AccumulatedEventData to
enumerate all accumulated event args.
(Inherited from SuspendableDocumentLeafNodeWithSingleAccumulatedDataT) | |
| ChildDisposeMemberT |
Helper function to dispose a child node of this instance. It helps to ensure the correct order: first, the child node is set to null and only then the child node is disposed.
(Inherited from SuspendableDocumentNodeBase) | |
| ClearErrors |
Clears the errors.
(Inherited from AbstractScript) | |
| Clone |
Clones the script.
(Overrides AbstractScriptClone) | |
| CloneForModification |
Clones the script so that the text can be modified.
(Inherited from AbstractScript) | |
| Compile |
Does the compilation of the script into an assembly.
If it was not compiled before or is dirty, it is compiled first.
From the compiled assembly, a new instance of the newly created script class is created
and stored in m_ScriptObject.
(Overrides AbstractScriptCompile) | |
| CopyFrom(AbstractScript, Boolean) |
Copies the content of a script to here.
(Inherited from AbstractScript) | |
| CopyFrom(FitFunctionScript, Boolean) | Copies the content of another fit-function script. | |
| DefaultParameterValue | Returns a default parameter value. You must ensure that the fit function would generate values with those default parameters. | |
| DefaultVarianceScaling | Returns the default variance scaling for the dependent variable i. | |
| DependentVariableName | Returns the ith dependent variable name. | |
| Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from SuspendableDocumentNodeBase) | |
| Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources.
(Inherited from SuspendableDocumentNodeBase) | |
| EhParentTunnelingEventHappened |
Is called by the parent when a tunneling event happened into the parent.
(Inherited from SuspendableDocumentNodeBase) | |
| EhSelfChanged |
Calls EhSelfChanged(EventArgs) with Empty.
(Inherited from SuspendableDocumentLeafNodeWithEventArgs) | |
| EhSelfChanged(EventArgs) |
Called if some member of this instance itself has changed.
(Inherited from SuspendableDocumentLeafNode) | |
| EhSelfTunnelingEventHappened(TunnelingEventArgs) |
Is called by this instance if a tunneling event happened into this instance. The tunneling event triggers the TunneledEvent and is additionally distributed to all childs of this instance.
(Inherited from SuspendableDocumentNodeBase) | |
| EhSelfTunnelingEventHappened(TunnelingEventArgs, Boolean) |
Is called by this instance if a tunneling event happened into this instance.
The tunneling event triggers the TunneledEvent and is - depending on the provided parameter - also distributed to all childs of this instance.
(Inherited from SuspendableDocumentNodeBase) | |
| Equals | Determines whether the specified object is equal to the current object. (Overrides AbstractScriptEquals(Object)) | |
| Evaluate(Double, Double) | Evaluates the fit function for a scalar input value and a parameter vector. | |
| Evaluate(IROMatrixDouble, IReadOnlyListDouble, IVectorDouble, IReadOnlyListBoolean) | Evaluates the function values at multiple x-points. | |
| Finalize |
Finalizes an instance of the SuspendableDocumentNodeBase class.
(Inherited from SuspendableDocumentNodeBase) | |
| GetErrorsAsString |
Returns the compiler errors as a formatted string.
(Inherited from AbstractScript) | |
| GetHashCode | Serves as the default hash function. (Overrides AbstractScriptGetHashCode) | |
| GetParameterBoundariesHardLimit | Gets the parameter boundaries that are really a hard limit, i.e. outside those limits, the function would probably evaluate NaN values, or makes no sense. | |
| GetParameterBoundariesSoftLimit | Gets the intended parameter boundaries. This are soft limits, boundaries so that the intended purpose of the fit function is fullfilled. Example: in the exponential decay Exp(-a*t) a is intended to be positive. This is a soft limit, and not a hard limit, because a could be also negative, and the fit nevertheless would succeed. | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| HandleLowPriorityChildChangeCases |
Handles the cases when a child changes, but a reaction is necessary only if the node is currently not suspended.
(Inherited from SuspendableDocumentLeafNode) | |
| IndependentVariableName | Returns the ith independent variable name. | |
| MakeSureWasTriedToCompile |
This ensures that it was tried to compile the script. If the script object is null, and it was not already tried to compile the
script, the script will be compiled by this function, and the script object will be created if the comilation was sucessfull. The flag isTriedToCompile is set
to true then (independent on the success of the compilation) to avoid subsequent tries to compile the code.
(Inherited from AbstractScript) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| OnAboutToBeResumed |
Is called when the suspend level is still 1 (one), but is about to fall to zero, i.e. shortly before the call to OnResume. This function is not called before OnResumeSilently!
(Inherited from SuspendableDocumentLeafNode) | |
| OnChanged |
Fires the change event with the EventArgs provided in the argument.
(Inherited from SuspendableDocumentNodeBase) | |
| OnResume |
Is called when the suspend level falls down from 1 to zero by a call to Resume or a call to [M:Altaxo.Main.ISuspendToken.Dispose()].
(Inherited from SuspendableDocumentLeafNode) | |
| OnResumeSilently |
Is called when the suspend level falls down from 1 to zero by a call to ResumeSilently.
The implementation should delete any accumulated events, should also disarm the suspendTokens of the childs of this object, and should not fire any Changed events nor set the change state of the object to dirty.
(Inherited from SuspendableDocumentLeafNode) | |
| OnSuspended |
Called when the suspend level has just gone from 0 to 1, i.e. the object was suspended.
(Inherited from SuspendableDocumentLeafNode) | |
| OnTunnelingEvent |
Fires the TunneledEvent event.
(Inherited from SuspendableDocumentNodeBase) | |
| ParameterName(Int32) | Returns the ith parameter name. | |
| ParameterName(Int32, Boolean) | Gets the name of the specified parameter. | |
| Resume(ISuspendToken) |
Resumes changed events by calling Resume for the provided suspend token, and setting the reference to the suspend token to null.
If Event data were accumulated during the suspended state, a changed event is triggered for each event data.
(Inherited from SuspendableDocumentNodeBase) | |
| Resume(ISuspendToken, EventFiring) |
Resumes changed events, either with taking the accumulated event data into account (see Resume(ISuspendToken)) or discarding the accumulated event data (see ResumeSilently(ISuspendToken),
depending on the provided argument eventFiring.
(Inherited from SuspendableDocumentNodeBase) | |
| ResumeCompleteTemporarily |
Resumes the object completely for only a short time. Thus, if object was suspended before, it will be suspended again when the function returns.
(Inherited from SuspendableDocumentLeafNode) | |
| ResumeCompleteTemporarilyGetToken |
Resumes the object completely for the time the returned token is referenced and not disposed.
The return value is a token that had 'absorbed' the suspend count of the object, resulting in the suspend count
of the object dropped to 0 (zero). When the returned token is finally disposed, the suspend count of the object is increased again by the 'absorbed' suspend count.
(Inherited from SuspendableDocumentLeafNode) | |
| ResumeSilently |
Resumes changed events by calling Resume for the provided suspend token, and setting the reference to the suspend token to null.
All event data accumulated during the suspended state are discarded, and thus no change event is triggered even if the instance has changed during the suspended state.
(Inherited from SuspendableDocumentNodeBase) | |
| SetCompilerResult |
Sets the compiler result for this script.
(Inherited from AbstractScript) | |
| SetDisposeInProgress |
Sets the flag that dispose is in progress for this node and all child nodes recursively.
(Inherited from SuspendableDocumentNodeBase) | |
| SetMemberAndRaiseSelfChangedT(NullableT, NullableT) |
Sets a member variable of this instance and raise a change event with Empty if the new value is different from the old value.
The comparison is done using the IEquatableT interface of the member variable.
Note: to set members that implement IDocumentNode please use the Child... functions.
(Inherited from SuspendableDocumentNodeBase) | |
| SetMemberAndRaiseSelfChangedT(T, T) |
Sets a member variable of this instance and raise a change event with Empty if the new value is different from the old value.
The comparison is done using the IEquatableT interface of the member variable.
Note: to set members that implement IDocumentNode please use the Child... functions.
(Inherited from SuspendableDocumentNodeBase) | |
| SetMemberEnumAndRaiseSelfChangedT |
Sets a member variable (which is an Enum) of this instance and raise a change event with Empty if the new value is different from the old value.
The comparison is done using the IEquatableT interface of the member variable.
Note: to set members that implement IDocumentNode please use the Child... functions.
(Inherited from SuspendableDocumentNodeBase) | |
| SuspendGetToken |
Suspend will increase the SuspendLevel.
(Inherited from SuspendableDocumentLeafNode) | |
| ToString | Returns a string that represents the current object. (Overrides ObjectToString) | |
| TryGetName |
Test if this item already has a name.
(Inherited from SuspendableDocumentNodeBase) |
| Name | Description | |
|---|---|---|
| Changed | Fired when something in the object has changed, and the object is not suspended. (Inherited from SuspendableDocumentNodeBase) | |
| TunneledEvent |
The event that is fired when the object is disposed. First argument is the sender, second argument is the original source, and third argument is the event arg.
(Inherited from SuspendableDocumentNodeBase) |
| Name | Description | |
|---|---|---|
| _accumulatedEventData |
Holds the accumulated change data.
(Inherited from SuspendableDocumentLeafNodeWithSingleAccumulatedDataT) | |
| _compilerResult |
The result of the successfull compiler run. After this variable is set, the script text must not be changed!
(Inherited from AbstractScript) | |
| _errors |
Holds error messages created by the compiler.
(Inherited from AbstractScript) | |
| _isDirty |
True when the text changed from last time this flag was reseted.
(Inherited from AbstractScript) | |
| _parent |
The parent object this instance belongs to.
(Inherited from SuspendableDocumentNodeBase) | |
| _scriptName |
The name of the script. This is set to a arbitrary unique name ending in ".cs".
(Inherited from AbstractScript) | |
| _scriptObject |
The script object. This is a instance of the newly created script class.
(Inherited from AbstractScript) | |
| _scriptText |
The text of the column script.
(Inherited from AbstractScript) | |
| _wasTriedToCompile |
True when the script text was already tried to compile.
(Inherited from AbstractScript) |