I have a class library with objects using Math.net
. The library contains classes that contain data and methods. As a trial I am instantiating an object of a member class and then call the the load method to fill the object with data from a file. However, the data loaded does not get passed to the new object. When I dump the object to the screen I get:
EchoStateNet.EchoState+Input
Where I should get a data dump. Below the library with the class definition and a test calling it.
namespace EchoStateNet
{
public class EchoState
{
// class that holds network input data
public class Input
{
public Matrix<double> dataSet { get; set; } // matrix holding train / test / run input data
public Input() : base() { } // default constructor
// method to load network data
public void load(string filePath, string fileName)
{
try
{
dataSet = DelimitedReader.Read<double>(Path.Combine(filePath, fileName), false, ",", false); // read the input data
}
catch (Exception ex)
{
Console.WriteLine("Error loading data. Exception: " + ex);
}
}
}
And the part that calls this:
namespace TestApplication
{
class Program
{
static void Main(string[] args)
{
EchoState.Input data = new EchoState.Input();
data.load("..\\..", "MackeyGlass_t17.txt");
Console.WriteLine("Input data:");
Console.WriteLine(data.ToString());
}
}
}
The output I am getting suggests to me that I may not have instantiated an object properly, but the syntax of Math.net is a bit different than a typical List<>
declaration, so I'm not sure what's wrong.