A basic cached column. Used internally by some of the Encog CSV quant classes. All of the file contents for this column are loaded into memory.
        /// <summary>
        ///     Get the data for a specific column.
        /// </summary>
        /// <param name="name">The column to read.</param>
        /// <param name="csv">The CSV file to read from.</param>
        /// <returns>The column data.</returns>
        public String GetColumnData(String name, ReadCSV csv)
        {
            if (!_columnMapping.ContainsKey(name))
            {
                return(null);
            }

            BaseCachedColumn column = _columnMapping[name];

            if (!(column is FileData))
            {
                return(null);
            }

            var fd = (FileData)column;

            return(csv.Get(fd.Index));
        }
Example #2
0
 /// <summary>
 ///     Add a new column.
 /// </summary>
 /// <param name="column">The column to add.</param>
 public void AddColumn(BaseCachedColumn column)
 {
     _columns.Add(column);
     _columnMapping[column.Name] = column;
 }
 /// <summary>
 ///     Add a new column.
 /// </summary>
 /// <param name="column">The column to add.</param>
 public void AddColumn(BaseCachedColumn column)
 {
     _columns.Add(column);
     _columnMapping[column.Name] = column;
 }
Example #4
0
 public void AddColumn(BaseCachedColumn column)
 {
     this._x26c511b92db96554.Add(column);
     this._x5f81ddd16c23e357[column.Name] = column;
 }