File: seclist.rst

package info (click to toggle)
neuron 8.2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,768 kB
  • sloc: cpp: 149,571; python: 58,449; ansic: 50,329; sh: 3,510; xml: 213; pascal: 51; makefile: 35; sed: 5
file content (167 lines) | stat: -rw-r--r-- 2,658 bytes parent folder | download | duplicates (3)
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

.. _hoc_seclist:

SectionList
-----------



.. hoc:class:: SectionList


    Syntax:
        ``sl = new SectionList()``


    Description:
        Class for creating and managing a list of sections 

    .. seealso::
        :hoc:class:`SectionBrowser`, :hoc:class:`Shape`, :ref:`forsec <hoc_keyword_forsec>`, :hoc:meth:`RangeVarPlot.list`

         

----



.. hoc:method:: SectionList.append


    Syntax:
        ``sl.append()``


    Description:
        append the currently accessed section to the list 

         

----



.. hoc:method:: SectionList.remove


    Syntax:
        ``n = sl.remove()``

        ``n = sl.remove(sectionlist)``


    Description:
        remove the currently accessed section from the list 
        If the argument is present then all the sections in sectionlist are 
        removed from sl. 
        Returns the number of sections removed. 

         

----



.. hoc:method:: SectionList.children


    Syntax:
        ``sl.children()``


    Description:
        Appends the sections connected to the currently accessed section. 
        Note that this includes children connected at position 0 of 
        parent. 

         

----



.. hoc:method:: SectionList.subtree


    Syntax:
        ``sl.subtree()``


    Description:
        Appends the subtree of the currently accessed section (including that one). 

         

----



.. hoc:method:: SectionList.wholetree


    Syntax:
        ``sl.wholetree()``


    Description:
        Appends all sections which have a path to the currently accessed section 
        (including the currently accessed section). The section list has the 
        important property that the sections are in root to leaf order. 

         

----



.. hoc:method:: SectionList.allroots


    Syntax:
        ``sl.allroots()``


    Description:
        Appends all the root sections. Root sections have no parent section. 
        The number of root sections is the number 
        of real cells in the simulation. 

         

----



.. hoc:method:: SectionList.unique


    Syntax:
        ``n = sl.unique()``


    Description:
        Removes all duplicates of sections in the SectionList. I.e. ensures that 
        no section appears more than once. Returns the number of sections references 
        that were removed. 

         

----



.. hoc:method:: SectionList.printnames


    Syntax:
        ``.printnames()``


    Description:
        print the names of the sections in the list. 
         
        The normal usage of a section list involves efficiently iterating 
        over all the sections in the list with 
        ``forsec sectionlist {statement}``