Skip to content

Commit 7ab6199

Browse files
committed
Markdown docs: `Definition, FullDefinition,Save
1 parent d6b2a31 commit 7ab6199

File tree

8 files changed

+254
-24
lines changed

8 files changed

+254
-24
lines changed

symja_android_library/doc/99-function-reference.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ Functions in alphabetical order:
391391
* ☑ [FromPolarCoordinates](functions/FromPolarCoordinates.md)
392392
* ✅ [FromRomanNumeral](functions/FromRomanNumeral.md)
393393
* ☑ [FromSphericalCoordinates](functions/FromSphericalCoordinates.md)
394+
* [FullDefinition](functions/FullDefinition.md)
394395
* ✅ [FullForm](functions/FullForm.md)
395396
* ✅ [FullSimplify](functions/FullSimplify.md)
396397
* ✅ [Function](functions/Function.md)
@@ -618,7 +619,7 @@ Functions in alphabetical order:
618619
* ✅ [Median](functions/Median.md)
619620
* ✅ [MedianFilter](functions/MedianFilter.md)
620621
* ✅ [MemberQ](functions/MemberQ.md)
621-
* [Merge](functions/Merge.md)
622+
* ✅ [Merge](functions/Merge.md)
622623
* ☑ [MersennePrimeExponent](functions/MersennePrimeExponent.md)
623624
* ☑ [MersennePrimeExponentQ](functions/MersennePrimeExponentQ.md)
624625
* ✅ [Message](functions/Message.md)
@@ -849,6 +850,7 @@ Functions in alphabetical order:
849850
* ✅ [SatisfiabilityCount](functions/SatisfiabilityCount.md)
850851
* ✅ [SatisfiabilityInstances](functions/SatisfiabilityInstances.md)
851852
* ✅ [SatisfiableQ](functions/SatisfiableQ.md)
853+
* [Save](functions/Save.md)
852854
* ✅ [SawtoothWave](functions/SawtoothWave.md)
853855
* ✅ [ScalingTransform](functions/ScalingTransform.md)
854856
* ✅ [Scan](functions/Scan.md)

symja_android_library/doc/functions/Definition.md

+23-11
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,34 @@
33
```
44
Definition(symbol)
55
```
6-
> prints user-defined values and rules associated with `symbol`.
6+
> prints values and rules associated with `symbol`.
77
88
### Examples
99

1010
```
1111
>> Definition(ArcSinh)
12-
{ArcSinh(0)=0,
13-
ArcSinh(I*1/2)=I*1/6*Pi,
14-
ArcSinh(I)=I*1/2*Pi,
15-
ArcSinh(1)=Log(1+Sqrt(2)),
16-
ArcSinh(I*1/2*Sqrt(2))=I*1/4*Pi,
17-
ArcSinh(I*1/2*Sqrt(3))=I*1/3*Pi,
18-
ArcSinh(Infinity)=Infinity,
19-
ArcSinh(I*Infinity)=Infinity,
20-
ArcSinh(ComplexInfinity)=ComplexInfinity}
21-
12+
Attributes(ArcSinh)={Listable,NumericFunction,Protected}
13+
14+
ArcSinh(I/Sqrt(2))=I*1/4*Pi
15+
16+
ArcSinh(Undefined)=Undefined
17+
18+
ArcSinh(Infinity)=Infinity
19+
20+
ArcSinh(I*Infinity)=Infinity
21+
22+
ArcSinh(I)=I*1/2*Pi
23+
24+
ArcSinh(0)=0
25+
26+
ArcSinh(I*1/2)=I*1/6*Pi
27+
28+
ArcSinh(I*1/2*Sqrt(3))=I*1/3*Pi
29+
30+
ArcSinh(ComplexInfinity)=ComplexInfinity
31+
```
32+
33+
```
2234
>> a=2
2335
2
2436
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## FullDefinition
2+
3+
```
4+
FullDefinition(symbol)
5+
```
6+
> prints value and rule definitions associated with `symbol` and dependent symbols without attribute `Protected` recursively.
7+
8+
### Examples
9+
10+
```
11+
>> FullDefinition(ArcSinh)
12+
Attributes(ArcSinh)={Listable,NumericFunction,Protected}
13+
14+
ArcSinh(I/Sqrt(2))=I*1/4*Pi
15+
16+
ArcSinh(Undefined)=Undefined
17+
18+
ArcSinh(Infinity)=Infinity
19+
20+
ArcSinh(I*Infinity)=Infinity
21+
22+
ArcSinh(I)=I*1/2*Pi
23+
24+
ArcSinh(0)=0
25+
26+
ArcSinh(I*1/2)=I*1/6*Pi
27+
28+
ArcSinh(I*1/2*Sqrt(3))=I*1/3*Pi
29+
30+
ArcSinh(ComplexInfinity)=ComplexInfinity
31+
```
32+
33+
```
34+
>> a(x_):=b(x,y);b[u_,v_]:={{u,v},a}
35+
a(x_):=b(x,y)
36+
37+
b(u_,v_):={{u,v},a}
38+
```
39+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## Save
2+
3+
```
4+
Save("path-to-filename", expression)
5+
```
6+
7+
> if the file system is enabled, export the `FullDefinition` of the `expression` to the "path-to-filename" file. The saved file can be imported with `Get`.
8+
9+
```
10+
Save("path-to-filename", "Global`*")
11+
```
12+
13+
> if the file system is enabled, export the `FullDefinition` of all symbols in the `"Global`*"` context to the "path-to-filename" file.
14+
15+
16+
### Examples
17+
18+
Save a definition with dependent symbol definitions into temporary file
19+
20+
```
21+
>> g(x_) := x^3;
22+
23+
>> g(x_,y_) := f(x,y);
24+
25+
>> SetAttributes(f, Listable);
26+
27+
>> f(x_) := g(x^2);
28+
29+
>> temp = FileNameJoin({$TemporaryDirectory, \"savedlist.txt\"});Print(temp);
30+
31+
>> Save(temp, {f,g})
32+
33+
>> ClearAll(f,g)
34+
35+
>> "Attributes(f)
36+
37+
>> {f(2),g(7)}
38+
39+
>> Get(temp)
40+
41+
>> {f(2),g(7)}
42+
{64,343}
43+
44+
>> Attributes(f)
45+
{Listable}
46+
```
47+
48+
### Related terms
49+
[BinaryDeserialize](BinaryDeserialize.md), [BinarySerialize](BinarySerialize.md), [ByteArray](ByteArray.md), [ByteArrayQ](ByteArrayQ.md), [Export](Export.md), [Import](Import.md)
50+
51+
52+
53+
54+
55+
56+
### Implementation status
57+
58+
* ☑ - partially implemented
59+
60+
### Github
61+
62+
* [Implementation of Export](https://github.com/axkr/symja_android_library/blob/master/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/Export.java#L42)

symja_android_library/matheclipse-core/src/main/resources/doc/99-function-reference.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ Functions in alphabetical order:
391391
* ☑ [FromPolarCoordinates](functions/FromPolarCoordinates.md)
392392
* ✅ [FromRomanNumeral](functions/FromRomanNumeral.md)
393393
* ☑ [FromSphericalCoordinates](functions/FromSphericalCoordinates.md)
394+
* [FullDefinition](functions/FullDefinition.md)
394395
* ✅ [FullForm](functions/FullForm.md)
395396
* ✅ [FullSimplify](functions/FullSimplify.md)
396397
* ✅ [Function](functions/Function.md)
@@ -618,7 +619,7 @@ Functions in alphabetical order:
618619
* ✅ [Median](functions/Median.md)
619620
* ✅ [MedianFilter](functions/MedianFilter.md)
620621
* ✅ [MemberQ](functions/MemberQ.md)
621-
* [Merge](functions/Merge.md)
622+
* ✅ [Merge](functions/Merge.md)
622623
* ☑ [MersennePrimeExponent](functions/MersennePrimeExponent.md)
623624
* ☑ [MersennePrimeExponentQ](functions/MersennePrimeExponentQ.md)
624625
* ✅ [Message](functions/Message.md)
@@ -849,6 +850,7 @@ Functions in alphabetical order:
849850
* ✅ [SatisfiabilityCount](functions/SatisfiabilityCount.md)
850851
* ✅ [SatisfiabilityInstances](functions/SatisfiabilityInstances.md)
851852
* ✅ [SatisfiableQ](functions/SatisfiableQ.md)
853+
* [Save](functions/Save.md)
852854
* ✅ [SawtoothWave](functions/SawtoothWave.md)
853855
* ✅ [ScalingTransform](functions/ScalingTransform.md)
854856
* ✅ [Scan](functions/Scan.md)

symja_android_library/matheclipse-core/src/main/resources/doc/functions/Definition.md

+23-11
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,34 @@
33
```
44
Definition(symbol)
55
```
6-
> prints user-defined values and rules associated with `symbol`.
6+
> prints values and rules associated with `symbol`.
77
88
### Examples
99

1010
```
1111
>> Definition(ArcSinh)
12-
{ArcSinh(0)=0,
13-
ArcSinh(I*1/2)=I*1/6*Pi,
14-
ArcSinh(I)=I*1/2*Pi,
15-
ArcSinh(1)=Log(1+Sqrt(2)),
16-
ArcSinh(I*1/2*Sqrt(2))=I*1/4*Pi,
17-
ArcSinh(I*1/2*Sqrt(3))=I*1/3*Pi,
18-
ArcSinh(Infinity)=Infinity,
19-
ArcSinh(I*Infinity)=Infinity,
20-
ArcSinh(ComplexInfinity)=ComplexInfinity}
21-
12+
Attributes(ArcSinh)={Listable,NumericFunction,Protected}
13+
14+
ArcSinh(I/Sqrt(2))=I*1/4*Pi
15+
16+
ArcSinh(Undefined)=Undefined
17+
18+
ArcSinh(Infinity)=Infinity
19+
20+
ArcSinh(I*Infinity)=Infinity
21+
22+
ArcSinh(I)=I*1/2*Pi
23+
24+
ArcSinh(0)=0
25+
26+
ArcSinh(I*1/2)=I*1/6*Pi
27+
28+
ArcSinh(I*1/2*Sqrt(3))=I*1/3*Pi
29+
30+
ArcSinh(ComplexInfinity)=ComplexInfinity
31+
```
32+
33+
```
2234
>> a=2
2335
2
2436
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## FullDefinition
2+
3+
```
4+
FullDefinition(symbol)
5+
```
6+
> prints value and rule definitions associated with `symbol` and dependent symbols without attribute `Protected` recursively.
7+
8+
### Examples
9+
10+
```
11+
>> FullDefinition(ArcSinh)
12+
Attributes(ArcSinh)={Listable,NumericFunction,Protected}
13+
14+
ArcSinh(I/Sqrt(2))=I*1/4*Pi
15+
16+
ArcSinh(Undefined)=Undefined
17+
18+
ArcSinh(Infinity)=Infinity
19+
20+
ArcSinh(I*Infinity)=Infinity
21+
22+
ArcSinh(I)=I*1/2*Pi
23+
24+
ArcSinh(0)=0
25+
26+
ArcSinh(I*1/2)=I*1/6*Pi
27+
28+
ArcSinh(I*1/2*Sqrt(3))=I*1/3*Pi
29+
30+
ArcSinh(ComplexInfinity)=ComplexInfinity
31+
```
32+
33+
```
34+
>> a(x_):=b(x,y);b[u_,v_]:={{u,v},a}
35+
a(x_):=b(x,y)
36+
37+
b(u_,v_):={{u,v},a}
38+
```
39+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## Save
2+
3+
```
4+
Save("path-to-filename", expression)
5+
```
6+
7+
> if the file system is enabled, export the `FullDefinition` of the `expression` to the "path-to-filename" file. The saved file can be imported with `Get`.
8+
9+
```
10+
Save("path-to-filename", "Global`*")
11+
```
12+
13+
> if the file system is enabled, export the `FullDefinition` of all symbols in the `"Global`*"` context to the "path-to-filename" file.
14+
15+
16+
### Examples
17+
18+
Save a definition with dependent symbol definitions into temporary file
19+
20+
```
21+
>> g(x_) := x^3;
22+
23+
>> g(x_,y_) := f(x,y);
24+
25+
>> SetAttributes(f, Listable);
26+
27+
>> f(x_) := g(x^2);
28+
29+
>> temp = FileNameJoin({$TemporaryDirectory, \"savedlist.txt\"});Print(temp);
30+
31+
>> Save(temp, {f,g})
32+
33+
>> ClearAll(f,g)
34+
35+
>> "Attributes(f)
36+
37+
>> {f(2),g(7)}
38+
39+
>> Get(temp)
40+
41+
>> {f(2),g(7)}
42+
{64,343}
43+
44+
>> Attributes(f)
45+
{Listable}
46+
```
47+
48+
### Related terms
49+
[BinaryDeserialize](BinaryDeserialize.md), [BinarySerialize](BinarySerialize.md), [ByteArray](ByteArray.md), [ByteArrayQ](ByteArrayQ.md), [Export](Export.md), [Import](Import.md)
50+
51+
52+
53+
54+
55+
56+
### Implementation status
57+
58+
* ☑ - partially implemented
59+
60+
### Github
61+
62+
* [Implementation of Export](https://github.com/axkr/symja_android_library/blob/master/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/Export.java#L42)

0 commit comments

Comments
 (0)