-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreferences.html
More file actions
217 lines (173 loc) · 15.4 KB
/
references.html
File metadata and controls
217 lines (173 loc) · 15.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>tyche.references — Tyche v1.0.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="tyche.probability" href="probability.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="module-tyche.references">
<span id="tyche-references"></span><h1>tyche.references<a class="headerlink" href="#module-tyche.references" title="Permalink to this heading">¶</a></h1>
<p>This module contains functionality to represent references to concepts
or roles. These references allow the value of concepts or roles to be
fetched from individuals, and updated with new values within individuals.</p>
<dl class="py exception">
<dt class="sig sig-object py" id="tyche.references.TycheReferencesException">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.references.</span></span><span class="sig-name descname"><span class="pre">TycheReferencesException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/references.html#TycheReferencesException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.references.TycheReferencesException" title="Permalink to this definition">¶</a></dt>
<dd><p>An exception type that is thrown when errors occur in
the construction or use of references.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>message</strong> (<em>str</em>) – </p>
</dd>
</dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.references.SymbolReference">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.references.</span></span><span class="sig-name descname"><span class="pre">SymbolReference</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">symbol</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/references.html#SymbolReference"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.references.SymbolReference" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Generic</span></code>[<code class="xref py py-obj docutils literal notranslate"><span class="pre">SymbolType</span></code>]</p>
<p>Represents a reference to the value of a symbol.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>symbol</strong> (<em>str</em>) – </p>
</dd>
</dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.references.BakedSymbolReference">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.references.</span></span><span class="sig-name descname"><span class="pre">BakedSymbolReference</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ref</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">obj</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/references.html#BakedSymbolReference"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.references.BakedSymbolReference" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Generic</span></code>[<code class="xref py py-obj docutils literal notranslate"><span class="pre">SymbolType</span></code>]</p>
<p>Represents a reference to the value of a symbol,
with the object that the value is accessed from baked in.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ref</strong> (<a class="reference internal" href="#tyche.references.SymbolReference" title="tyche.references.SymbolReference"><em>SymbolReference</em></a><em>[</em><em>SymbolType</em><em>]</em>) – </p></li>
<li><p><strong>obj</strong> (<em>object</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.references.FieldSymbolReference">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.references.</span></span><span class="sig-name descname"><span class="pre">FieldSymbolReference</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">symbol</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/references.html#FieldSymbolReference"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.references.FieldSymbolReference" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Generic</span></code>[<code class="xref py py-obj docutils literal notranslate"><span class="pre">SymbolType</span></code>], <a class="reference internal" href="#tyche.references.SymbolReference" title="tyche.references.SymbolReference"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolReference</span></code></a>[<code class="xref py py-obj docutils literal notranslate"><span class="pre">SymbolType</span></code>]</p>
<p>Represents a reference to a field in an object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>symbol</strong> (<em>str</em>) – </p></li>
<li><p><strong>field_name</strong> (<em>Optional</em><em>[</em><em>str</em><em>]</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.references.FunctionSymbolReference">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.references.</span></span><span class="sig-name descname"><span class="pre">FunctionSymbolReference</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">symbol</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fget</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/references.html#FunctionSymbolReference"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.references.FunctionSymbolReference" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Generic</span></code>[<code class="xref py py-obj docutils literal notranslate"><span class="pre">SymbolType</span></code>], <a class="reference internal" href="#tyche.references.SymbolReference" title="tyche.references.SymbolReference"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolReference</span></code></a>[<code class="xref py py-obj docutils literal notranslate"><span class="pre">SymbolType</span></code>]</p>
<p>Represents a reference to a mutable property in an object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>symbol</strong> (<em>str</em>) – </p></li>
<li><p><strong>fget</strong> (<em>Callable</em><em>[</em><em>[</em><em>object</em><em>]</em><em>, </em><em>SymbolType</em><em>]</em>) – </p></li>
<li><p><strong>fset</strong> (<em>Optional</em><em>[</em><em>Callable</em><em>[</em><em>[</em><em>object</em><em>, </em><em>SymbolType</em><em>]</em><em>, </em><em>None</em><em>]</em><em>]</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.references.GuardedSymbolReference">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.references.</span></span><span class="sig-name descname"><span class="pre">GuardedSymbolReference</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ref</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">get_transform</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">set_transform</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/references.html#GuardedSymbolReference"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.references.GuardedSymbolReference" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Generic</span></code>[<code class="xref py py-obj docutils literal notranslate"><span class="pre">SymbolType</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">GuardedSymbolType</span></code>], <a class="reference internal" href="#tyche.references.SymbolReference" title="tyche.references.SymbolReference"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolReference</span></code></a>[<code class="xref py py-obj docutils literal notranslate"><span class="pre">SymbolType</span></code>]</p>
<p>Represents a mutable reference where the accessed value is
different to the value stored in the reference. The referenced
value is transformed when accessed or modified.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ref</strong> (<a class="reference internal" href="#tyche.references.SymbolReference" title="tyche.references.SymbolReference"><em>SymbolReference</em></a><em>[</em><em>GuardedSymbolType</em><em>]</em>) – </p></li>
<li><p><strong>get_transform</strong> (<em>Callable</em><em>[</em><em>[</em><em>GuardedSymbolType</em><em>]</em><em>, </em><em>SymbolType</em><em>]</em>) – </p></li>
<li><p><strong>set_transform</strong> (<em>Optional</em><em>[</em><em>Callable</em><em>[</em><em>[</em><em>SymbolType</em><em>]</em><em>, </em><em>GuardedSymbolType</em><em>]</em><em>]</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>
</section>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/logo.png" alt="Logo"/>
</a></p>
<h1 class="logo"><a href="index.html">Tyche</a></h1>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="language.html">tyche.language</a></li>
<li class="toctree-l1"><a class="reference internal" href="individuals.html">tyche.individuals</a></li>
<li class="toctree-l1"><a class="reference internal" href="distributions.html">tyche.distributions</a></li>
<li class="toctree-l1"><a class="reference internal" href="probability.html">tyche.probability</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">tyche.references</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#tyche.references.TycheReferencesException">TycheReferencesException</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.references.SymbolReference">SymbolReference</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.references.BakedSymbolReference">BakedSymbolReference</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.references.FieldSymbolReference">FieldSymbolReference</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.references.FunctionSymbolReference">FunctionSymbolReference</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.references.GuardedSymbolReference">GuardedSymbolReference</a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="probability.html" title="previous chapter">tyche.probability</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2023, Padraig Lamont, drtnf.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
|
<a href="_sources/references.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>