MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
ValueDescriptorCollection.cs
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7
9{
13 [Serializable]
14 public class ValueDescriptorCollection : IEnumerable<ValueDescriptor>
15 {
16 List<ValueDescriptor> m_rgValues = new List<ValueDescriptor>();
17
22 {
23 }
24
30 {
31 foreach (ValueDescriptor v in rg)
32 {
33 m_rgValues.Add(new descriptors.ValueDescriptor(v));
34 }
35 }
36
40 public int Count
41 {
42 get { return m_rgValues.Count; }
43 }
44
50 public ValueDescriptor this[int nIdx]
51 {
52 get { return m_rgValues[nIdx]; }
53 }
54
59 public void Add(ValueDescriptor p)
60 {
61 m_rgValues.Add(p);
62 }
63
69 public ValueDescriptor Find(string strName)
70 {
71 foreach (ValueDescriptor v in m_rgValues)
72 {
73 if (v.Name == strName)
74 return v;
75 }
76
77 return null;
78 }
79
84 public IEnumerator<ValueDescriptor> GetEnumerator()
85 {
86 return m_rgValues.GetEnumerator();
87 }
88
93 IEnumerator IEnumerable.GetEnumerator()
94 {
95 return m_rgValues.GetEnumerator();
96 }
97 }
98}
string Name
Get/set the name of the item.
The ValueDescriptorCollection class contains a list of ValueDescriptor's.
ValueDescriptorCollection(ValueDescriptorCollection rg)
The ValueDescriptorCollection constructor.
ValueDescriptor Find(string strName)
Searches for a parameter by name in the collection.
void Add(ValueDescriptor p)
Adds a ValueDescriptor to the collection.
int Count
Returns the count of items in the collection.
IEnumerator< ValueDescriptor > GetEnumerator()
Returns the enumerator of the collection.
ValueDescriptorCollection()
The ValueDescriptorCollection constructor.
The ValueDescriptor class contains the description of a single value.
The descriptors namespace contains all descriptor used to describe various items stored within the da...