pict-section-formeditor 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +118 -0
- package/docs/.nojekyll +0 -0
- package/docs/README.md +162 -0
- package/docs/_sidebar.md +23 -0
- package/docs/_topbar.md +5 -0
- package/docs/cover.md +12 -0
- package/docs/css/docuserve.css +73 -0
- package/docs/index.html +39 -0
- package/docs/retold-catalog.json +224 -0
- package/docs/retold-keyword-index.json +46846 -0
- package/example_applications/form_editor/.quackage.json +10 -0
- package/example_applications/form_editor/FormEditor-Example-Application.js +226 -0
- package/example_applications/form_editor/html/icon-chooser.html +375 -0
- package/example_applications/form_editor/html/index.html +54 -0
- package/example_applications/form_editor/package.json +50 -0
- package/package.json +55 -0
- package/sample_manifests/Complex-Table.json +974 -0
- package/sample_manifests/Distill-Example.json +200 -0
- package/sample_manifests/Gradebook-Assignment.json +38 -0
- package/sample_manifests/Gradebook-Student.json +40 -0
- package/sample_manifests/Manyfest-Editor.json +347 -0
- package/sample_manifests/Simple-Form.json +232 -0
- package/sample_manifests/Simple-Table.json +79 -0
- package/source/Pict-Section-FormEditor-DefaultConfiguration.js +3321 -0
- package/source/Pict-Section-FormEditor.js +35 -0
- package/source/providers/Pict-Provider-ChildPictManager-Application.js +40 -0
- package/source/providers/Pict-Provider-ChildPictManager.js +238 -0
- package/source/providers/Pict-Provider-FormEditorDocumentation.js +356 -0
- package/source/providers/Pict-Provider-FormEditorDragDrop.js +535 -0
- package/source/providers/Pict-Provider-FormEditorIconography.js +1002 -0
- package/source/providers/Pict-Provider-FormEditorManifestOps.js +1443 -0
- package/source/providers/Pict-Provider-FormEditorRendering.js +730 -0
- package/source/providers/Pict-Provider-FormEditorUtilities.js +862 -0
- package/source/providers/Pict-Provider-PreviewCSS.js +42 -0
- package/source/views/PictView-FormEditor-InlineEditing.js +309 -0
- package/source/views/PictView-FormEditor-InputTypePicker.js +532 -0
- package/source/views/PictView-FormEditor-PropertiesPanel.js +7730 -0
- package/source/views/PictView-FormEditor.js +681 -0
- package/test/Pict-Section-FormEditor_tests.js +4102 -0
- package/user-documentation/.pict_documentation_topics.json +695 -0
- package/user-documentation/Getting-Started.md +32 -0
- package/user-documentation/Groups.md +52 -0
- package/user-documentation/Inputs.md +98 -0
- package/user-documentation/Sections.md +36 -0
- package/user-documentation/Shortcuts.md +44 -0
- package/user-documentation/Solver-Expression-Walkthrough.md +176 -0
- package/user-documentation/Solver-Expressions-Advanced.md +344 -0
- package/user-documentation/Solver-Functions.md +213 -0
- package/user-documentation/Solvers.md +81 -0
- package/user-documentation/ToC.md +18 -0
- package/user-documentation/solverfunctions/abs.md +84 -0
- package/user-documentation/solverfunctions/aggregationhistogram.md +83 -0
- package/user-documentation/solverfunctions/aggregationhistogrambyobject.md +64 -0
- package/user-documentation/solverfunctions/arrayconcat.md +64 -0
- package/user-documentation/solverfunctions/avg.md +81 -0
- package/user-documentation/solverfunctions/bucketset.md +69 -0
- package/user-documentation/solverfunctions/ceil.md +70 -0
- package/user-documentation/solverfunctions/cleanvaluearray.md +66 -0
- package/user-documentation/solverfunctions/cleanvalueobject.md +68 -0
- package/user-documentation/solverfunctions/colorgroupbackground.md +60 -0
- package/user-documentation/solverfunctions/colorinputbackground.md +62 -0
- package/user-documentation/solverfunctions/colorinputbackgroundtabular.md +64 -0
- package/user-documentation/solverfunctions/colorsectionbackground.md +59 -0
- package/user-documentation/solverfunctions/compare.md +72 -0
- package/user-documentation/solverfunctions/concat.md +73 -0
- package/user-documentation/solverfunctions/concatraw.md +73 -0
- package/user-documentation/solverfunctions/cos.md +75 -0
- package/user-documentation/solverfunctions/count.md +73 -0
- package/user-documentation/solverfunctions/countset.md +65 -0
- package/user-documentation/solverfunctions/countsetelements.md +63 -0
- package/user-documentation/solverfunctions/createarrayfromabsolutevalues.md +63 -0
- package/user-documentation/solverfunctions/createvalueobjectbyhashes.md +69 -0
- package/user-documentation/solverfunctions/cumulativesummation.md +96 -0
- package/user-documentation/solverfunctions/dateadddays.md +79 -0
- package/user-documentation/solverfunctions/dateaddhours.md +74 -0
- package/user-documentation/solverfunctions/dateaddmilliseconds.md +65 -0
- package/user-documentation/solverfunctions/dateaddminutes.md +72 -0
- package/user-documentation/solverfunctions/dateaddmonths.md +74 -0
- package/user-documentation/solverfunctions/dateaddseconds.md +66 -0
- package/user-documentation/solverfunctions/dateaddweeks.md +73 -0
- package/user-documentation/solverfunctions/dateaddyears.md +74 -0
- package/user-documentation/solverfunctions/datedaydifference.md +84 -0
- package/user-documentation/solverfunctions/datefromparts.md +81 -0
- package/user-documentation/solverfunctions/datehourdifference.md +64 -0
- package/user-documentation/solverfunctions/datemathadd.md +72 -0
- package/user-documentation/solverfunctions/datemilliseconddifference.md +64 -0
- package/user-documentation/solverfunctions/dateminutedifference.md +64 -0
- package/user-documentation/solverfunctions/datemonthdifference.md +66 -0
- package/user-documentation/solverfunctions/dateseconddifference.md +64 -0
- package/user-documentation/solverfunctions/dateweekdifference.md +65 -0
- package/user-documentation/solverfunctions/dateyeardifference.md +64 -0
- package/user-documentation/solverfunctions/differencearrays.md +59 -0
- package/user-documentation/solverfunctions/disablesolverordinal.md +58 -0
- package/user-documentation/solverfunctions/distributionhistogram.md +96 -0
- package/user-documentation/solverfunctions/distributionhistogrambyobject.md +64 -0
- package/user-documentation/solverfunctions/enablesolverordinal.md +57 -0
- package/user-documentation/solverfunctions/entryinset.md +72 -0
- package/user-documentation/solverfunctions/euler.md +77 -0
- package/user-documentation/solverfunctions/exp.md +74 -0
- package/user-documentation/solverfunctions/findfirstvaluebyexactmatch.md +67 -0
- package/user-documentation/solverfunctions/findfirstvaluebystringincludes.md +67 -0
- package/user-documentation/solverfunctions/flatten.md +76 -0
- package/user-documentation/solverfunctions/floor.md +70 -0
- package/user-documentation/solverfunctions/gaussianelimination.md +75 -0
- package/user-documentation/solverfunctions/generatearrayofobjectsfromsets.md +70 -0
- package/user-documentation/solverfunctions/generatehtmlhexcolor.md +67 -0
- package/user-documentation/solverfunctions/getvalue.md +90 -0
- package/user-documentation/solverfunctions/getvaluearray.md +64 -0
- package/user-documentation/solverfunctions/getvalueobject.md +67 -0
- package/user-documentation/solverfunctions/hidesections.md +58 -0
- package/user-documentation/solverfunctions/if.md +109 -0
- package/user-documentation/solverfunctions/iterativeseries.md +107 -0
- package/user-documentation/solverfunctions/join.md +75 -0
- package/user-documentation/solverfunctions/joinraw.md +64 -0
- package/user-documentation/solverfunctions/largestinset.md +63 -0
- package/user-documentation/solverfunctions/leastsquares.md +66 -0
- package/user-documentation/solverfunctions/linest.md +58 -0
- package/user-documentation/solverfunctions/log.md +74 -0
- package/user-documentation/solverfunctions/logvalues.md +65 -0
- package/user-documentation/solverfunctions/match.md +71 -0
- package/user-documentation/solverfunctions/matrixinverse.md +67 -0
- package/user-documentation/solverfunctions/matrixmultiply.md +71 -0
- package/user-documentation/solverfunctions/matrixtranspose.md +72 -0
- package/user-documentation/solverfunctions/matrixvectormultiply.md +69 -0
- package/user-documentation/solverfunctions/max.md +73 -0
- package/user-documentation/solverfunctions/mean.md +63 -0
- package/user-documentation/solverfunctions/median.md +79 -0
- package/user-documentation/solverfunctions/min.md +73 -0
- package/user-documentation/solverfunctions/mode.md +66 -0
- package/user-documentation/solverfunctions/objectkeystoarray.md +66 -0
- package/user-documentation/solverfunctions/objectvaluessortbyexternalobjectarray.md +65 -0
- package/user-documentation/solverfunctions/objectvaluestoarray.md +67 -0
- package/user-documentation/solverfunctions/percent.md +75 -0
- package/user-documentation/solverfunctions/pi.md +77 -0
- package/user-documentation/solverfunctions/polynomialregression.md +69 -0
- package/user-documentation/solverfunctions/predict.md +71 -0
- package/user-documentation/solverfunctions/rad.md +85 -0
- package/user-documentation/solverfunctions/randomfloat.md +63 -0
- package/user-documentation/solverfunctions/randomfloatbetween.md +72 -0
- package/user-documentation/solverfunctions/randomfloatupto.md +65 -0
- package/user-documentation/solverfunctions/randominteger.md +56 -0
- package/user-documentation/solverfunctions/randomintegerbetween.md +72 -0
- package/user-documentation/solverfunctions/randomintegerupto.md +64 -0
- package/user-documentation/solverfunctions/refreshtabularsection.md +57 -0
- package/user-documentation/solverfunctions/resolvehtmlentities.md +64 -0
- package/user-documentation/solverfunctions/round.md +111 -0
- package/user-documentation/solverfunctions/runsolvers.md +49 -0
- package/user-documentation/solverfunctions/setconcatenate.md +64 -0
- package/user-documentation/solverfunctions/setgroupvisibility.md +60 -0
- package/user-documentation/solverfunctions/setsectionvisibility.md +59 -0
- package/user-documentation/solverfunctions/setsolverordinalenabled.md +59 -0
- package/user-documentation/solverfunctions/settabularrowlength.md +57 -0
- package/user-documentation/solverfunctions/setvalue.md +65 -0
- package/user-documentation/solverfunctions/showsections.md +58 -0
- package/user-documentation/solverfunctions/sin.md +83 -0
- package/user-documentation/solverfunctions/slice.md +80 -0
- package/user-documentation/solverfunctions/smallestinset.md +63 -0
- package/user-documentation/solverfunctions/sortarray.md +58 -0
- package/user-documentation/solverfunctions/sorthistogram.md +70 -0
- package/user-documentation/solverfunctions/sorthistogrambykeys.md +69 -0
- package/user-documentation/solverfunctions/sortset.md +75 -0
- package/user-documentation/solverfunctions/sqrt.md +85 -0
- package/user-documentation/solverfunctions/stdev.md +81 -0
- package/user-documentation/solverfunctions/stdeva.md +58 -0
- package/user-documentation/solverfunctions/stdevp.md +83 -0
- package/user-documentation/solverfunctions/stringcountsegments.md +66 -0
- package/user-documentation/solverfunctions/stringgetsegments.md +74 -0
- package/user-documentation/solverfunctions/subtractingsummation.md +66 -0
- package/user-documentation/solverfunctions/sum.md +78 -0
- package/user-documentation/solverfunctions/tan.md +78 -0
- package/user-documentation/solverfunctions/tofixed.md +75 -0
- package/user-documentation/solverfunctions/unionarrays.md +59 -0
- package/user-documentation/solverfunctions/uniquearray.md +58 -0
- package/user-documentation/solverfunctions/var.md +67 -0
- package/user-documentation/solverfunctions/vara.md +58 -0
- package/user-documentation/solverfunctions/varp.md +66 -0
- package/user-documentation/solverfunctions/when.md +98 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# linest
|
|
2
|
+
|
|
3
|
+
Performs linear estimation (alias for leastsquares).
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
linest(xValues, yValues)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `xValues` | Array | Array of x-coordinates (independent variable) |
|
|
16
|
+
| `yValues` | Array | Array of y-coordinates (dependent variable) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
Object - Regression results including slope, intercept, and statistics.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `linest` function is an alias for `leastsquares`, performing linear regression to find the best-fit line through data points. Named after the Excel LINEST function.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = LINEST([1, 2, 3, 4, 5], [2, 4, 6, 8, 10])
|
|
32
|
+
// Returns: { slope: 2, intercept: 0, ... }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Spreadsheet-Style Usage
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
// Similar to Excel LINEST
|
|
39
|
+
Regression = LINEST(IndependentData, DependentData)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Use Cases
|
|
43
|
+
|
|
44
|
+
- **Spreadsheet compatibility**: Excel-like function
|
|
45
|
+
- **Trend analysis**: Linear trends
|
|
46
|
+
- **Forecasting**: Project values
|
|
47
|
+
|
|
48
|
+
## Related Functions
|
|
49
|
+
|
|
50
|
+
- [leastsquares](./leastsquares.md) - Same function, different name
|
|
51
|
+
- [polynomialregression](./polynomialregression.md) - Higher-order regression
|
|
52
|
+
- [predict](./predict.md) - Predict using results
|
|
53
|
+
|
|
54
|
+
## Notes
|
|
55
|
+
|
|
56
|
+
- Alias for `leastsquares`
|
|
57
|
+
- Excel-compatible naming
|
|
58
|
+
- Uses the Math service's `leastSquares` method
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# log
|
|
2
|
+
|
|
3
|
+
Calculates the natural logarithm (base e) of a number.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
log(value)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `value` | Number | The number to calculate the logarithm of |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
Number - The natural logarithm of the input value.
|
|
20
|
+
|
|
21
|
+
## Description
|
|
22
|
+
|
|
23
|
+
The `log` function calculates the natural logarithm (ln) of a number. The natural logarithm uses Euler's number (e ≈ 2.71828) as its base.
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Usage
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
Result = LOG(10)
|
|
31
|
+
// Result: 2.302585092994046 (approximately)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Logarithm of e
|
|
35
|
+
|
|
36
|
+
```expression
|
|
37
|
+
Result = LOG(EULER())
|
|
38
|
+
// Result: 1
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With Variables
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
LogValue = LOG(InputNumber)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Inverse of exp
|
|
48
|
+
|
|
49
|
+
```expression
|
|
50
|
+
// LOG and EXP are inverse functions
|
|
51
|
+
Original = 5
|
|
52
|
+
Transformed = LOG(EXP(Original))
|
|
53
|
+
// Transformed ≈ 5
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Use Cases
|
|
57
|
+
|
|
58
|
+
- **Growth analysis**: Logarithmic scaling of data
|
|
59
|
+
- **Scientific calculations**: Mathematical modeling
|
|
60
|
+
- **Data transformation**: Normalizing skewed data
|
|
61
|
+
- **Financial calculations**: Compound interest analysis
|
|
62
|
+
|
|
63
|
+
## Related Functions
|
|
64
|
+
|
|
65
|
+
- [exp](./exp.md) - Inverse function (e^x)
|
|
66
|
+
- [euler](./euler.md) - Euler's number constant
|
|
67
|
+
- [sqrt](./sqrt.md) - Square root
|
|
68
|
+
|
|
69
|
+
## Notes
|
|
70
|
+
|
|
71
|
+
- Returns NaN for negative numbers
|
|
72
|
+
- Returns -Infinity for 0
|
|
73
|
+
- Uses JavaScript's `Math.log` internally
|
|
74
|
+
- LOG(1) = 0
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# logvalues
|
|
2
|
+
|
|
3
|
+
Logs values to the browser console and returns the last value. Useful for debugging solver expressions.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
logvalues(val1, val2, ...)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `val1` | Any | First value to log |
|
|
16
|
+
| `val2` | Any | Second value to log |
|
|
17
|
+
| `...` | Any | Additional values to log |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
The last value passed to the function.
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
|
|
25
|
+
The `logvalues` function outputs each of its arguments to the browser developer console, then returns the last argument. This is primarily a debugging tool that lets you inspect intermediate values in solver expressions without disrupting the expression chain. Since it returns the last value, it can be inserted into expressions to observe values at any point during evaluation.
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### Debugging a calculation
|
|
30
|
+
|
|
31
|
+
```expression
|
|
32
|
+
Debug = logvalues(Price, Quantity, Total)
|
|
33
|
+
// Logs Price, Quantity, and Total to the console; Debug is set to Total
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Inspecting a single value
|
|
37
|
+
|
|
38
|
+
```expression
|
|
39
|
+
Check = logvalues(SomeComputedValue)
|
|
40
|
+
// Logs SomeComputedValue to the console and returns it
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Tracing multiple intermediate values
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
Trace = logvalues("Step1", RawPrice, "Step2", AdjustedPrice, "Final", FinalPrice)
|
|
47
|
+
// Logs all six arguments; Trace is set to FinalPrice
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Use Cases
|
|
51
|
+
|
|
52
|
+
- **Debugging solvers**: Inspect values during solver execution to verify correctness of intermediate calculations
|
|
53
|
+
- **Tracing data flow**: Log multiple related values to understand how data flows through expressions
|
|
54
|
+
- **Temporary inspection**: Drop into an expression temporarily to check a value, then remove when done
|
|
55
|
+
|
|
56
|
+
## Related Functions
|
|
57
|
+
|
|
58
|
+
- [setvalue](./setvalue.md) - Sets a value in the application state
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
|
|
62
|
+
- Accepts any number of arguments
|
|
63
|
+
- Always returns the last argument passed
|
|
64
|
+
- Output appears in the browser developer console (open with F12 or Ctrl+Shift+I)
|
|
65
|
+
- Intended for development and debugging; consider removing from production solver expressions
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# match
|
|
2
|
+
|
|
3
|
+
Tests a string against a regular expression pattern.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
match(text, pattern)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `text` | String | The string to test |
|
|
16
|
+
| `pattern` | String | Regular expression pattern |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
Boolean - True if the pattern matches, false otherwise.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `match` function tests whether a string matches a regular expression pattern. Returns true if the pattern is found anywhere in the string.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = MATCH("Hello World", "World")
|
|
32
|
+
// Result: true
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Email Validation
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
IsEmail = MATCH(InputValue, "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$")
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Phone Number Pattern
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
IsPhone = MATCH(PhoneNumber, "^\\d{3}-\\d{3}-\\d{4}$")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Contains Digit
|
|
48
|
+
|
|
49
|
+
```expression
|
|
50
|
+
HasDigit = MATCH(Password, "\\d")
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Use Cases
|
|
54
|
+
|
|
55
|
+
- **Validation**: Validate input formats
|
|
56
|
+
- **Pattern matching**: Find patterns in text
|
|
57
|
+
- **Filtering**: Conditional processing
|
|
58
|
+
- **Data quality**: Check data format
|
|
59
|
+
|
|
60
|
+
## Related Functions
|
|
61
|
+
|
|
62
|
+
- [findfirstvaluebyexactmatch](./findfirstvaluebyexactmatch.md) - Find in array
|
|
63
|
+
- [findfirstvaluebystringincludes](./findfirstvaluebystringincludes.md) - Substring search
|
|
64
|
+
- [if](./if.md) - Use with conditional logic
|
|
65
|
+
|
|
66
|
+
## Notes
|
|
67
|
+
|
|
68
|
+
- Uses JavaScript regex
|
|
69
|
+
- Escape special characters with double backslash
|
|
70
|
+
- Returns boolean
|
|
71
|
+
- Uses the Utility service's `legacyMatch` method
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# matrixinverse
|
|
2
|
+
|
|
3
|
+
Calculates the inverse of a square matrix.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
matrixinverse(matrix)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `matrix` | Array | Square matrix (n×n) |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
Array - The inverse matrix.
|
|
20
|
+
|
|
21
|
+
## Description
|
|
22
|
+
|
|
23
|
+
The `matrixinverse` function calculates the inverse of a square matrix. The inverse matrix A⁻¹ satisfies A × A⁻¹ = I (identity matrix).
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Usage
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
// Matrix: [[4, 7], [2, 6]]
|
|
31
|
+
Result = MATRIXINVERSE([[4, 7], [2, 6]])
|
|
32
|
+
// Result: [[0.6, -0.7], [-0.2, 0.4]]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 3x3 Matrix
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Matrix3x3 = [[1, 2, 3], [0, 1, 4], [5, 6, 0]]
|
|
39
|
+
Inverse = MATRIXINVERSE(Matrix3x3)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Solving Equations
|
|
43
|
+
|
|
44
|
+
```expression
|
|
45
|
+
// Solve Ax = b → x = A⁻¹b
|
|
46
|
+
Solution = MATRIXVECTORMULTIPLY(MATRIXINVERSE(A), B)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Use Cases
|
|
50
|
+
|
|
51
|
+
- **Solving linear systems**: Find solutions to Ax = b
|
|
52
|
+
- **Transformations**: Reverse transformations
|
|
53
|
+
- **Regression**: Part of least squares solution
|
|
54
|
+
- **Control systems**: System analysis
|
|
55
|
+
|
|
56
|
+
## Related Functions
|
|
57
|
+
|
|
58
|
+
- [matrixmultiply](./matrixmultiply.md) - Verify inverse
|
|
59
|
+
- [gaussianelimination](./gaussianelimination.md) - Alternative solver
|
|
60
|
+
- [matrixtranspose](./matrixtranspose.md) - Transpose matrix
|
|
61
|
+
|
|
62
|
+
## Notes
|
|
63
|
+
|
|
64
|
+
- Matrix must be square
|
|
65
|
+
- Matrix must be invertible (non-singular)
|
|
66
|
+
- Throws error for singular matrices
|
|
67
|
+
- Uses the Math service's `matrixInverse` method
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# matrixmultiply
|
|
2
|
+
|
|
3
|
+
Multiplies two matrices together.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
matrixmultiply(matrix1, matrix2)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `matrix1` | Array | First matrix (m×n) |
|
|
16
|
+
| `matrix2` | Array | Second matrix (n×p) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
Array - The resulting matrix (m×p).
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `matrixmultiply` function performs matrix multiplication of two matrices. The number of columns in the first matrix must equal the number of rows in the second matrix.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
// A = [[1, 2], [3, 4]]
|
|
32
|
+
// B = [[5, 6], [7, 8]]
|
|
33
|
+
Result = MATRIXMULTIPLY([[1, 2], [3, 4]], [[5, 6], [7, 8]])
|
|
34
|
+
// Result: [[19, 22], [43, 50]]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Different Dimensions
|
|
38
|
+
|
|
39
|
+
```expression
|
|
40
|
+
// 2x3 matrix times 3x2 matrix
|
|
41
|
+
A = [[1, 2, 3], [4, 5, 6]]
|
|
42
|
+
B = [[7, 8], [9, 10], [11, 12]]
|
|
43
|
+
Result = MATRIXMULTIPLY(A, B)
|
|
44
|
+
// Result: 2x2 matrix
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Transformation
|
|
48
|
+
|
|
49
|
+
```expression
|
|
50
|
+
// Apply transformation matrix
|
|
51
|
+
Transformed = MATRIXMULTIPLY(TransformMatrix, DataMatrix)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Use Cases
|
|
55
|
+
|
|
56
|
+
- **Linear algebra**: Matrix computations
|
|
57
|
+
- **Transformations**: Apply linear transforms
|
|
58
|
+
- **Systems of equations**: Solve matrix equations
|
|
59
|
+
- **Computer graphics**: Coordinate transformations
|
|
60
|
+
|
|
61
|
+
## Related Functions
|
|
62
|
+
|
|
63
|
+
- [matrixtranspose](./matrixtranspose.md) - Transpose matrix
|
|
64
|
+
- [matrixvectormultiply](./matrixvectormultiply.md) - Matrix-vector multiplication
|
|
65
|
+
- [matrixinverse](./matrixinverse.md) - Matrix inverse
|
|
66
|
+
|
|
67
|
+
## Notes
|
|
68
|
+
|
|
69
|
+
- Dimensions must be compatible (m×n × n×p = m×p)
|
|
70
|
+
- Not commutative (A×B ≠ B×A generally)
|
|
71
|
+
- Uses the Math service's `matrixMultiply` method
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# matrixtranspose
|
|
2
|
+
|
|
3
|
+
Transposes a matrix (swaps rows and columns).
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
matrixtranspose(matrix)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `matrix` | Array | 2D array representing the matrix |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
Array - The transposed matrix.
|
|
20
|
+
|
|
21
|
+
## Description
|
|
22
|
+
|
|
23
|
+
The `matrixtranspose` function swaps the rows and columns of a matrix. Element at position [i][j] moves to position [j][i].
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Usage
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
// Given matrix:
|
|
31
|
+
// [[1, 2, 3],
|
|
32
|
+
// [4, 5, 6]]
|
|
33
|
+
Result = MATRIXTRANSPOSE([[1, 2, 3], [4, 5, 6]])
|
|
34
|
+
// Result:
|
|
35
|
+
// [[1, 4],
|
|
36
|
+
// [2, 5],
|
|
37
|
+
// [3, 6]]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Square Matrix
|
|
41
|
+
|
|
42
|
+
```expression
|
|
43
|
+
Matrix = [[1, 2], [3, 4]]
|
|
44
|
+
Transposed = MATRIXTRANSPOSE(Matrix)
|
|
45
|
+
// Result: [[1, 3], [2, 4]]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Data Orientation
|
|
49
|
+
|
|
50
|
+
```expression
|
|
51
|
+
// Convert row-oriented data to column-oriented
|
|
52
|
+
ColumnData = MATRIXTRANSPOSE(RowData)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Use Cases
|
|
56
|
+
|
|
57
|
+
- **Linear algebra**: Matrix operations
|
|
58
|
+
- **Data transformation**: Row/column conversion
|
|
59
|
+
- **Statistical analysis**: Data orientation
|
|
60
|
+
- **Grid manipulation**: Rotate data structure
|
|
61
|
+
|
|
62
|
+
## Related Functions
|
|
63
|
+
|
|
64
|
+
- [matrixmultiply](./matrixmultiply.md) - Multiply matrices
|
|
65
|
+
- [matrixinverse](./matrixinverse.md) - Invert matrix
|
|
66
|
+
- [matrixvectormultiply](./matrixvectormultiply.md) - Matrix-vector multiplication
|
|
67
|
+
|
|
68
|
+
## Notes
|
|
69
|
+
|
|
70
|
+
- 2x3 matrix becomes 3x2 matrix
|
|
71
|
+
- Works with rectangular matrices
|
|
72
|
+
- Uses the Math service's `matrixTranspose` method
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# matrixvectormultiply
|
|
2
|
+
|
|
3
|
+
Multiplies a matrix by a vector.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
matrixvectormultiply(matrix, vector)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `matrix` | Array | 2D array representing the matrix (m×n) |
|
|
16
|
+
| `vector` | Array | 1D array representing the vector (length n) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
Array - The resulting vector (length m).
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `matrixvectormultiply` function multiplies a matrix by a column vector. The vector length must equal the number of columns in the matrix.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
// Matrix: [[1, 2], [3, 4]]
|
|
32
|
+
// Vector: [5, 6]
|
|
33
|
+
Result = MATRIXVECTORMULTIPLY([[1, 2], [3, 4]], [5, 6])
|
|
34
|
+
// Result: [17, 39]
|
|
35
|
+
// [1*5 + 2*6, 3*5 + 4*6] = [17, 39]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Transformation
|
|
39
|
+
|
|
40
|
+
```expression
|
|
41
|
+
// Apply transformation to point
|
|
42
|
+
NewPoint = MATRIXVECTORMULTIPLY(RotationMatrix, Point)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Linear Combination
|
|
46
|
+
|
|
47
|
+
```expression
|
|
48
|
+
// Compute linear combination of basis vectors
|
|
49
|
+
Result = MATRIXVECTORMULTIPLY(BasisMatrix, Coefficients)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Use Cases
|
|
53
|
+
|
|
54
|
+
- **Linear transformations**: Apply transforms to points
|
|
55
|
+
- **Solving equations**: Part of solving Ax = b
|
|
56
|
+
- **Graphics**: Coordinate transformations
|
|
57
|
+
- **Physics**: Linear operations
|
|
58
|
+
|
|
59
|
+
## Related Functions
|
|
60
|
+
|
|
61
|
+
- [matrixmultiply](./matrixmultiply.md) - Matrix-matrix multiplication
|
|
62
|
+
- [matrixtranspose](./matrixtranspose.md) - Transpose matrix
|
|
63
|
+
- [matrixinverse](./matrixinverse.md) - Matrix inverse
|
|
64
|
+
|
|
65
|
+
## Notes
|
|
66
|
+
|
|
67
|
+
- Vector treated as column vector
|
|
68
|
+
- Vector length must match matrix columns
|
|
69
|
+
- Uses the Math service's `matrixVectorMultiply` method
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# max
|
|
2
|
+
|
|
3
|
+
Returns the largest value from a set of numbers.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
max(value1, value2, ...)
|
|
9
|
+
max(array)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Type | Description |
|
|
15
|
+
|-----------|------|-------------|
|
|
16
|
+
| `values` | Number(s) | Individual numbers or an array of numbers |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
String - The maximum value from the input set.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `max` function finds and returns the largest value from a set of numbers. It can accept individual arguments or an array of values.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = MAX(5, 10, 3, 8)
|
|
32
|
+
// Result: "10"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### With Variables
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Highest = MAX(Score1, Score2, Score3)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With Array
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
// Given an array of values
|
|
45
|
+
MaxValue = MAX(AppData.Scores)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### In Expressions
|
|
49
|
+
|
|
50
|
+
```expression
|
|
51
|
+
// Find the highest price
|
|
52
|
+
MaxPrice = MAX(FLATTEN(AppData.Products.price))
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Use Cases
|
|
56
|
+
|
|
57
|
+
- **Data analysis**: Find highest values in datasets
|
|
58
|
+
- **Pricing**: Determine maximum price
|
|
59
|
+
- **Scoring**: Find top scores
|
|
60
|
+
- **Limits**: Establish upper bounds
|
|
61
|
+
|
|
62
|
+
## Related Functions
|
|
63
|
+
|
|
64
|
+
- [min](./min.md) - Find minimum value
|
|
65
|
+
- [largestinset](./largestinset.md) - Alternative for finding largest
|
|
66
|
+
- [sortset](./sortset.md) - Sort values to find extremes
|
|
67
|
+
- [avg](./avg.md) - Calculate average
|
|
68
|
+
|
|
69
|
+
## Notes
|
|
70
|
+
|
|
71
|
+
- Returns result as string (arbitrary precision)
|
|
72
|
+
- Works with the Math service's `maxPrecise` method
|
|
73
|
+
- Handles both individual arguments and arrays
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# mean
|
|
2
|
+
|
|
3
|
+
Calculates the arithmetic mean (average) of values.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
mean(value1, value2, ...)
|
|
9
|
+
mean(array)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Type | Description |
|
|
15
|
+
|-----------|------|-------------|
|
|
16
|
+
| `values` | Number(s) | Individual numbers or an array of numbers |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
String - The arithmetic mean.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `mean` function calculates the arithmetic mean (average) of a set of numbers. This is an alias for the `avg` function.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = MEAN(10, 20, 30, 40, 50)
|
|
32
|
+
// Result: "30"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### With Array
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Average = MEAN(FLATTEN(AppData.Scores))
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Statistics
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
MeanValue = MEAN(DataSet)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Use Cases
|
|
48
|
+
|
|
49
|
+
- **Statistics**: Central tendency
|
|
50
|
+
- **Analysis**: Average values
|
|
51
|
+
- **Reporting**: Mean calculations
|
|
52
|
+
|
|
53
|
+
## Related Functions
|
|
54
|
+
|
|
55
|
+
- [avg](./avg.md) - Same function (alias)
|
|
56
|
+
- [median](./median.md) - Middle value
|
|
57
|
+
- [mode](./mode.md) - Most frequent value
|
|
58
|
+
|
|
59
|
+
## Notes
|
|
60
|
+
|
|
61
|
+
- Alias for `avg` function
|
|
62
|
+
- Uses the Math service's `meanPrecise` method
|
|
63
|
+
- Returns result as string for precision
|