Skip to content

Commit e73240f

Browse files
committed
Update docs, catch nullptr deref.
1 parent 1842307 commit e73240f

File tree

3 files changed

+271
-116
lines changed

3 files changed

+271
-116
lines changed

core/algorithms/untrace.cnb

Lines changed: 103 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,159 @@
11
{
2-
"cell_id" : 17473324490989807474,
3-
"cells" :
4-
[
2+
"cell_id": 17473324490989807474,
3+
"cells": [
54
{
6-
"cell_id" : 17620023483363172328,
7-
"cell_origin" : "client",
8-
"cell_type" : "latex",
9-
"cells" :
10-
[
5+
"cell_id": 17620023483363172328,
6+
"cell_origin": "client",
7+
"cell_type": "latex",
8+
"cells": [
119
{
12-
"cell_id" : 13214722607572420305,
13-
"cell_origin" : "client",
14-
"cell_type" : "latex_view",
15-
"source" : "\\algorithm{untrace}{Take objects out of traces}\n\nWhen a trace contains objects which do not carry any implicit indices on which the \ntrace acts, the \\algo{untrace} algorithm can be used to take them out of the\ntrace. This is similar to the way in which \\algo{unwrap} takes objects out of\nderivatives when they do not depend on the object with respect to which the derivative \nis taken."
10+
"cell_id": 7700461705362123739,
11+
"cell_origin": "client",
12+
"cell_type": "latex_view",
13+
"source": "\\algorithm{untrace}{Take objects out of traces}\n\nWhen a trace contains objects which do not carry any implicit indices on which the \ntrace acts, the \\algo{untrace} algorithm can be used to take them out of the\ntrace. This is similar to the way in which \\algo{unwrap} takes objects out of\nderivatives when they do not depend on the object with respect to which the derivative \nis taken."
1614
}
1715
],
18-
"hidden" : true,
19-
"source" : "\\algorithm{untrace}{Take objects out of traces}\n\nWhen a trace contains objects which do not carry any implicit indices on which the \ntrace acts, the \\algo{untrace} algorithm can be used to take them out of the\ntrace. This is similar to the way in which \\algo{unwrap} takes objects out of\nderivatives when they do not depend on the object with respect to which the derivative \nis taken."
16+
"hidden": true,
17+
"source": "\\algorithm{untrace}{Take objects out of traces}\n\nWhen a trace contains objects which do not carry any implicit indices on which the \ntrace acts, the \\algo{untrace} algorithm can be used to take them out of the\ntrace. This is similar to the way in which \\algo{unwrap} takes objects out of\nderivatives when they do not depend on the object with respect to which the derivative \nis taken."
2018
},
2119
{
22-
"cell_id" : 12842358434533101410,
23-
"cell_origin" : "client",
24-
"cell_type" : "latex",
25-
"cells" :
26-
[
20+
"cell_id": 12842358434533101410,
21+
"cell_origin": "client",
22+
"cell_type": "latex",
23+
"cells": [
2724
{
28-
"cell_id" : 12118716233802889858,
29-
"cell_origin" : "client",
30-
"cell_type" : "latex_view",
31-
"source" : "Unless you declare objects to have a \\prop{ImplicitIndex} property, they will be taken out. The minimal example does not specify these indices, e.g."
25+
"cell_id": 14029965045660066717,
26+
"cell_origin": "client",
27+
"cell_type": "latex_view",
28+
"source": "Unless you declare objects to have a \\prop{ImplicitIndex} property, they will be taken out. The minimal example does not specify these indices, e.g."
3229
}
3330
],
34-
"hidden" : true,
35-
"source" : "Unless you declare objects to have a \\prop{ImplicitIndex} property, they will be taken out. The minimal example does not specify these indices, e.g."
31+
"hidden": true,
32+
"source": "Unless you declare objects to have a \\prop{ImplicitIndex} property, they will be taken out. The minimal example does not specify these indices, e.g."
3633
},
3734
{
38-
"cell_id" : 9535091562390105121,
39-
"cell_origin" : "client",
40-
"cell_type" : "input",
41-
"cells" :
42-
[
35+
"cell_id": 9535091562390105121,
36+
"cell_origin": "client",
37+
"cell_type": "input",
38+
"cells": [
4339
{
44-
"cell_id" : 1222142395953423326,
45-
"cell_origin" : "server",
46-
"cell_type" : "latex_view",
47-
"cells" :
48-
[
40+
"cell_id": 12470129597878327812,
41+
"cell_origin": "server",
42+
"cell_type": "latex_view",
43+
"cells": [
4944
{
50-
"cell_id" : 16340700521415068976,
51-
"cell_origin" : "server",
52-
"cell_type" : "input_form",
53-
"source" : "tr(q A B)"
45+
"cell_id": 14929967836227092198,
46+
"cell_origin": "server",
47+
"cell_type": "input_form",
48+
"source": "tr(q A B)"
5449
}
5550
],
56-
"source" : "\\begin{dmath*}{}tr\\left(q A B\\right)\\end{dmath*}"
51+
"source": "\\begin{dmath*}{}tr\\left(q A B\\right)\\end{dmath*}"
5752
},
5853
{
59-
"cell_id" : 15979629137288914996,
60-
"cell_origin" : "server",
61-
"cell_type" : "latex_view",
62-
"cells" :
63-
[
54+
"cell_id": 14602620579978943179,
55+
"cell_origin": "server",
56+
"cell_type": "latex_view",
57+
"cells": [
6458
{
65-
"cell_id" : 6101318762459049479,
66-
"cell_origin" : "server",
67-
"cell_type" : "input_form",
68-
"source" : "q tr(A B)"
59+
"cell_id": 1773090927971160558,
60+
"cell_origin": "server",
61+
"cell_type": "input_form",
62+
"source": "q tr(A B)"
6963
}
7064
],
71-
"source" : "\\begin{dmath*}{}q tr\\left(A B\\right)\\end{dmath*}"
65+
"source": "\\begin{dmath*}{}q tr\\left(A B\\right)\\end{dmath*}"
7266
}
7367
],
74-
"source" : "{A,B}::ImplicitIndex.\ntr{#}::Trace.\nex:= tr( q A B );\nuntrace(_);"
68+
"source": "{A,B}::ImplicitIndex.\ntr{#}::Trace.\nex:= tr( q A B );\nuntrace(_);"
7569
},
7670
{
77-
"cell_id" : 599709734600671488,
78-
"cell_origin" : "client",
79-
"cell_type" : "latex",
80-
"cells" :
81-
[
71+
"cell_id": 599709734600671488,
72+
"cell_origin": "client",
73+
"cell_type": "latex",
74+
"cells": [
8275
{
83-
"cell_id" : 6801199231042999205,
84-
"cell_origin" : "client",
85-
"cell_type" : "latex_view",
86-
"source" : "In the declaration of a trace, it is possible to indicate over which indices the trace is being taken."
76+
"cell_id": 6801199231042999205,
77+
"cell_origin": "client",
78+
"cell_type": "latex_view",
79+
"source": "In the declaration of a trace, it is possible to indicate over which indices the trace is being taken."
8780
}
8881
],
89-
"hidden" : true,
90-
"source" : "In the declaration of a trace, it is possible to indicate over which indices the trace is being taken."
82+
"hidden": true,
83+
"source": "In the declaration of a trace, it is possible to indicate over which indices the trace is being taken."
9184
},
9285
{
93-
"cell_id" : 14632792720123745310,
94-
"cell_origin" : "client",
95-
"cell_type" : "input",
96-
"source" : "{a,b,c}::Indices(spinor).\n{m,n,p}::Indices(vector).\nC::ImplicitIndex(C_{a b}).\nD::ImplicitIndex(D_{a b}).\nE::ImplicitIndex(E^{m n}).\nTr{#}::Trace(indices=spinor)."
86+
"cell_id": 14632792720123745310,
87+
"cell_origin": "client",
88+
"cell_type": "input",
89+
"source": "{a,b,c}::Indices(spinor).\n{m,n,p}::Indices(vector).\nC::ImplicitIndex(C_{a b}).\nD::ImplicitIndex(D_{a b}).\nE::ImplicitIndex(E^{m n}).\nTr{#}::Trace(indices=spinor)."
9790
},
9891
{
99-
"cell_id" : 14282261514648391593,
100-
"cell_origin" : "client",
101-
"cell_type" : "input",
102-
"cells" :
103-
[
92+
"cell_id": 14282261514648391593,
93+
"cell_origin": "client",
94+
"cell_type": "input",
95+
"cells": [
10496
{
105-
"cell_id" : 7769183754058014831,
106-
"cell_origin" : "server",
107-
"cell_type" : "latex_view",
108-
"cells" :
109-
[
97+
"cell_id": 1628602802577310529,
98+
"cell_origin": "server",
99+
"cell_type": "latex_view",
100+
"cells": [
110101
{
111-
"cell_id" : 11195164057524721675,
112-
"cell_origin" : "server",
113-
"cell_type" : "input_form",
114-
"source" : "Tr(C D E)"
102+
"cell_id": 3495019957146126718,
103+
"cell_origin": "server",
104+
"cell_type": "input_form",
105+
"source": "Tr(C D E)"
115106
}
116107
],
117-
"source" : "\\begin{dmath*}{}Tr\\left(C D E\\right)\\end{dmath*}"
108+
"source": "\\begin{dmath*}{}Tr\\left(C D E\\right)\\end{dmath*}"
118109
}
119110
],
120-
"source" : "ex:= Tr( C D E );"
111+
"source": "ex:= Tr( C D E );"
121112
},
122113
{
123-
"cell_id" : 7947298485656223155,
124-
"cell_origin" : "client",
125-
"cell_type" : "input",
126-
"cells" :
127-
[
114+
"cell_id": 7947298485656223155,
115+
"cell_origin": "client",
116+
"cell_type": "input",
117+
"cells": [
128118
{
129-
"cell_id" : 1210476478210584205,
130-
"cell_origin" : "server",
131-
"cell_type" : "latex_view",
132-
"cells" :
133-
[
119+
"cell_id": 17084545913981834117,
120+
"cell_origin": "server",
121+
"cell_type": "latex_view",
122+
"cells": [
134123
{
135-
"cell_id" : 1197184137079986897,
136-
"cell_origin" : "server",
137-
"cell_type" : "input_form",
138-
"source" : "E Tr(C D)"
124+
"cell_id": 2107438105775406723,
125+
"cell_origin": "server",
126+
"cell_type": "input_form",
127+
"source": "E Tr(C D)"
139128
}
140129
],
141-
"source" : "\\begin{dmath*}{}E Tr\\left(C D\\right)\\end{dmath*}"
130+
"source": "\\begin{dmath*}{}E Tr\\left(C D\\right)\\end{dmath*}"
142131
}
143132
],
144-
"source" : "untrace(_);"
133+
"source": "untrace(_);"
145134
},
146135
{
147-
"cell_id" : 13091146635063293823,
148-
"cell_origin" : "client",
149-
"cell_type" : "latex",
150-
"cells" :
151-
[
136+
"cell_id": 13091146635063293823,
137+
"cell_origin": "client",
138+
"cell_type": "latex",
139+
"cells": [
152140
{
153-
"cell_id" : 17865201676022650852,
154-
"cell_origin" : "client",
155-
"cell_type" : "latex_view",
156-
"source" : "Note how, even though $E$ has implicit indices, it has been moved out of the trace, as the\nlatter is declared to be a trace over spinor indices, not vector indices."
141+
"cell_id": 17938807333085018593,
142+
"cell_origin": "client",
143+
"cell_type": "latex_view",
144+
"source": "Note how, even though $E$ has implicit indices, it has been moved out of the trace, as the\nlatter is declared to be a trace over spinor indices, not vector indices."
157145
}
158146
],
159-
"hidden" : true,
160-
"source" : "Note how, even though $E$ has implicit indices, it has been moved out of the trace, as the\nlatter is declared to be a trace over spinor indices, not vector indices."
147+
"hidden": true,
148+
"source": "Note how, even though $E$ has implicit indices, it has been moved out of the trace, as the\nlatter is declared to be a trace over spinor indices, not vector indices."
161149
},
162150
{
163-
"cell_id" : 4484332793243439838,
164-
"cell_origin" : "client",
165-
"cell_type" : "latex",
166-
"source" : ""
151+
"cell_id": 13319255015209183503,
152+
"cell_origin": "client",
153+
"cell_type": "input",
154+
"source": ""
167155
}
168156
],
169-
"description" : "Cadabra JSON notebook format",
170-
"version" : 1
157+
"description": "Cadabra JSON notebook format",
158+
"version": 1.0
171159
}

0 commit comments

Comments
 (0)