This repository has been archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
ResultBundle.cs
83 lines (73 loc) · 2.95 KB
/
ResultBundle.cs
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
using System;
using System.Collections.Generic;
namespace RCNet.Neural.Data
{
/// <summary>
/// Implements a bundle of input, computed and ideal (desired) data vector triplets.
/// </summary>
[Serializable]
public class ResultBundle
{
//Attributes
/// <summary>
/// The collection of input vectors.
/// </summary>
public List<double[]> InputVectorCollection { get; }
/// <summary>
/// The collection of computed vectors.
/// </summary>
public List<double[]> ComputedVectorCollection { get; }
/// <summary>
/// The collection of ideal vectors.
/// </summary>
public List<double[]> IdealVectorCollection { get; }
//Constructors
/// <summary>
/// Creates an initialized instance.
/// </summary>
/// <param name="inputVectorCollection">The collection of input vectors.</param>
/// <param name="computedVectorCollection">The collection of computed vectors.</param>
/// <param name="idealVectorCollection">The collection of ideal vectors.</param>
public ResultBundle(List<double[]> inputVectorCollection, List<double[]> computedVectorCollection, List<double[]> idealVectorCollection)
{
InputVectorCollection = new List<double[]>(inputVectorCollection);
ComputedVectorCollection = new List<double[]>(computedVectorCollection);
IdealVectorCollection = new List<double[]>(idealVectorCollection);
return;
}
/// <summary>
/// Creates an uninitialized instance.
/// </summary>
public ResultBundle()
{
InputVectorCollection = new List<double[]>();
ComputedVectorCollection = new List<double[]>();
IdealVectorCollection = new List<double[]>();
return;
}
/// <summary>
/// Creates an uninitialized instance.
/// </summary>
/// <param name="expectedNumOfRows">The expected number of vector rows.</param>
public ResultBundle(int expectedNumOfRows)
{
InputVectorCollection = new List<double[]>(expectedNumOfRows);
ComputedVectorCollection = new List<double[]>(expectedNumOfRows);
IdealVectorCollection = new List<double[]>(expectedNumOfRows);
return;
}
/// <summary>
/// Adds vectors into the bundle.
/// </summary>
/// <param name="inputVector">The input vector.</param>
/// <param name="computedVector">The computed vector.</param>
/// <param name="idealVector">The ideal vector.</param>
public void AddVectors(double[] inputVector, double[] computedVector, double[] idealVector)
{
InputVectorCollection.Add(inputVector);
ComputedVectorCollection.Add(computedVector);
IdealVectorCollection.Add(idealVector);
return;
}
}//ResultBundle
}//Namespace