Difference between revisions of "DataCacheSpecificationWeightColumn class"
(Created page with "{{CGscriptClass_Template |Name=<nowiki>DataCacheSpecificationWeightColumn</nowiki> |Description=<nowiki>Represents a DataCache specifications weight column.</nowiki> |Construc...") |
|||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
|Name=<nowiki>DataCacheSpecificationWeightColumn</nowiki> | |Name=<nowiki>DataCacheSpecificationWeightColumn</nowiki> | ||
|Description=<nowiki>Represents a DataCache specifications weight column.</nowiki> | |Description=<nowiki>Represents a DataCache specifications weight column.</nowiki> | ||
− | |Constructors= | + | |InheritsFrom=object|Constructors= |
{{CGscriptConstructors_Template|Parameters= | {{CGscriptConstructors_Template|Parameters= | ||
{{CGscriptParameters_Template|Type=DataCacheSpecification|Name=<nowiki>dcs</nowiki>|Description=<nowiki>Attach weight to this dcs.</nowiki>}} | {{CGscriptParameters_Template|Type=DataCacheSpecification|Name=<nowiki>dcs</nowiki>|Description=<nowiki>Attach weight to this dcs.</nowiki>}} | ||
|Description=<nowiki>Instanciate a new weight column.</nowiki>}} | |Description=<nowiki>Instanciate a new weight column.</nowiki>}} | ||
{{CGscriptConstructors_Template|Parameters= | {{CGscriptConstructors_Template|Parameters= | ||
− | {{CGscriptParameters_Template|Type=DataCacheSpecification|Name=<nowiki>dcs</nowiki>|Description=<nowiki> | + | {{CGscriptParameters_Template|Type=DataCacheSpecification|Name=<nowiki>dcs</nowiki>|Description=<nowiki>Fetch weight from this dcs.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of the existing weight column.</nowiki>}} |
|Description=<nowiki>Get existing new weight column.</nowiki>}} | |Description=<nowiki>Get existing new weight column.</nowiki>}} | ||
|Methods= | |Methods= | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Delete</nowiki>|Description=<nowiki>Removes the weight from the DCS.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Delete</nowiki>|Description=<nowiki>Removes the weight from the DCS.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType= | + | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>GetCategories</nowiki>|Parameters= |
{{CGscriptParameters_Template|Type=string|Name=<nowiki>variable</nowiki>|Description=<nowiki>Variable name.</nowiki>}} | {{CGscriptParameters_Template|Type=string|Name=<nowiki>variable</nowiki>|Description=<nowiki>Variable name.</nowiki>}} | ||
|Description=<nowiki>Get the ids and names of the possible categories.</nowiki>}} | |Description=<nowiki>Get the ids and names of the possible categories.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType= | + | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>GetCurrentNumber</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=string|Name=<nowiki>variable</nowiki>|Description=<nowiki>Variable name.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type= | + | {{CGscriptParameters_Template|Type=string|Name=<nowiki>variable</nowiki>|Description=<nowiki>Variable name.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>category</nowiki>|Description=<nowiki>Category id.</nowiki>}} |
|Description=<nowiki>Get the calculated weight number for a variable's category.</nowiki>}} | |Description=<nowiki>Get the calculated weight number for a variable's category.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetTarget</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetTarget</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=string|Name=<nowiki>variable</nowiki>|Description=<nowiki>Variable name.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type= | + | {{CGscriptParameters_Template|Type=string|Name=<nowiki>variable</nowiki>|Description=<nowiki>Variable name.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>category</nowiki>|Description=<nowiki>Category id.</nowiki>}} |
|Description=<nowiki>Get the target for a variable's category.</nowiki>}} | |Description=<nowiki>Get the target for a variable's category.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>MoveTargetsToDifferentVariable</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>MoveTargetsToDifferentVariable</nowiki>|Parameters= | ||
Line 28: | Line 28: | ||
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save the weight after validation into the dcs and recalculate weight. Return value is a dictionary of all the variable values, weight values, modified sum (all arrays of numbers) and the log (string).</nowiki>}} | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save the weight after validation into the dcs and recalculate weight. Return value is a dictionary of all the variable values, weight values, modified sum (all arrays of numbers) and the log (string).</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTarget</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTarget</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=string|Name=<nowiki>variable</nowiki>|Description=<nowiki>Variable name.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type= | + | {{CGscriptParameters_Template|Type=string|Name=<nowiki>variable</nowiki>|Description=<nowiki>Variable name.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>category</nowiki>|Description=<nowiki>Category id.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>target</nowiki>|Description=<nowiki>Target to set for the weight.</nowiki>}} |
|Description=<nowiki>Set the target for a variable's category.</nowiki>}} | |Description=<nowiki>Set the target for a variable's category.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}} |
+ | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>UpdateCurrents</nowiki>|Description=<nowiki>Fetch the count of rows matching the categories of the current selected variables.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>Validate</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>Validate</nowiki>|Parameters= | ||
{{CGscriptParameters_Template|Type=bool|Name=<nowiki>includeWarnings</nowiki>|Description=<nowiki>Should validation also return warnings or not.</nowiki>}} | {{CGscriptParameters_Template|Type=bool|Name=<nowiki>includeWarnings</nowiki>|Description=<nowiki>Should validation also return warnings or not.</nowiki>}} | ||
|Description=<nowiki>Validate the current configuration. Returns first error message, or Empty if no error.</nowiki>}} | |Description=<nowiki>Validate the current configuration. Returns first error message, or Empty if no error.</nowiki>}} | ||
|Properties= | |Properties= | ||
− | {{CGscriptProperties_Template|ReturnType= | + | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>MaxIteration</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set MaxIteration before stopping calculation.</nowiki>}} |
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>MaxWeight</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set how large the largest weight can become.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>MaxWeight</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set how large the largest weight can become.</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>MinDeviation</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set the minimum deviation before weight is considered stable.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>MinDeviation</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set the minimum deviation before weight is considered stable.</nowiki>}} | ||
Line 41: | Line 42: | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Name</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Name.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Name</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Name.</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType= | + | {{CGscriptProperties_Template|ReturnType=Array of strings|Name=<nowiki>PossibleVariables</nowiki>|HasGetter=1|Description=<nowiki>List the variables available in the DCS.</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType= | + | {{CGscriptProperties_Template|ReturnType=Array of strings|Name=<nowiki>SelectedVariables</nowiki>|HasGetter=1|Description=<nowiki>List the current variables used to calculate this weight.</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType= | + | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>TotalNumber</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set the sum that the weight should add up to.</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}} | + | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} |
}} | }} |
Latest revision as of 08:01, 2 July 2020
DataCacheSpecificationWeightColumn
Represents a DataCache specifications weight column.
Parent class
Inherits from object
Constructors
- (DataCacheSpecification dcs "Attach weight to this dcs.") - Instanciate a new weight column.
- (DataCacheSpecification dcs "Fetch weight from this dcs.", string name "Name of the existing weight column.") - Get existing new weight column.
Methods
- Empty Delete() - Removes the weight from the DCS.
- Dictionary GetCategories(string variable "Variable name.") - Get the ids and names of the possible categories.
- int GetCurrentNumber(string variable "Variable name.", int category "Category id.") - Get the calculated weight number for a variable's category.
- number GetTarget(string variable "Variable name.", int category "Category id.") - Get the target for a variable's category.
- Empty MoveTargetsToDifferentVariable(string from "Variable name.", string to "Variable name.") - Move the current numbers and targets to another variable.
- Empty RemoveVariable(string variable "Variable name.") - Remove a variable from the calculation.
- Dictionary Save() - Save the weight after validation into the dcs and recalculate weight. Return value is a dictionary of all the variable values, weight values, modified sum (all arrays of numbers) and the log (string).
- Empty SetTarget(string variable "Variable name.", int category "Category id.", number target "Target to set for the weight.") - Set the target for a variable's category.
- (From object) string ToString() - The string representation of the object.
- Empty UpdateCurrents() - Fetch the count of rows matching the categories of the current selected variables.
- string Validate(bool includeWarnings "Should validation also return warnings or not.") - Validate the current configuration. Returns first error message, or Empty if no error.
Properties
- int MaxIteration { get; set; } - Get/Set MaxIteration before stopping calculation.
- number MaxWeight { get; set; } - Get/Set how large the largest weight can become.
- number MinDeviation { get; set; } - Get/Set the minimum deviation before weight is considered stable.
- number MinWeight { get; set; } - Get/Set how small the smallest weight can become.
- string Name { get; set; } - Get/Set Name.
- string ObjectTypeName { get; } - The name of the type of object.
- Array of string PossibleVariables { get; } - List the variables available in the DCS.
- Array of string SelectedVariables { get; } - List the current variables used to calculate this weight.
- int TotalNumber { get; set; } - Get/Set the sum that the weight should add up to.
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.