<commit_before>/*
 * HyPerCol.h
 *
 *  Created on: Jul 30, 2008
 *      Author: rasmussn
 */

#ifndef HYPERCOL_HPP_
#define HYPERCOL_HPP_

#include "../layers/PVLayer.h"
#include "../connections/HyPerConn.hpp"
#include "../io/PVParams.hpp"
#include "../include/pv_types.h"

namespace PV {

class HyPerLayer;
class InterColComm;
class HyPerConn;

class HyPerCol {

public:

   HyPerCol(const char* name, int argc, char* argv[]);
   virtual ~HyPerCol();

   int initFinish(void); // call after all layers/connections have been added
   int initializeThreads();
   int finalizeThreads();

   int run(int nTimeSteps);
   int run_old(int nTimeSteps); // has thread usage that needs to be moved
   int run()            {return run(numSteps);}

   int loadState();
   int writeState();

   int columnId();
   const char * inputFile()              {return image_file;}

//   int deliver(PVConnection* conn, PVRect preRegion, int count, float* buf);

   int addLayer(HyPerLayer * l);
   int addConnection(HyPerConn * conn);

   HyPerLayer * getLayer(int which)       {return layers[which];}
   HyPerConn  * getConnection(int which)  {return connections[which];}

   InterColComm * icCommunicator()        {return icComm;}

   PVParams * parameters()                {return params;}

   float getDeltaTime()                   {return deltaTime;}
   float simulationTime()                 {return time;}

   LayerLoc getImageLoc()                 {return imageloc;}
   float  width()                         {return imageLoc.nx;}
   float  height()                        {return imageLoc.ny;}

   int numberOfTimeSteps()                {return numSteps;}

   int numberOfColumns();

   int numberOfConnections()              {return numConnections;}

   /** returns the number of border regions, either an actual image border or a neighbor **/
   int numberOfBorderRegions()            {return MAX_NEIGHBORS;}

   int commColumn(int colId);
   int commRow(int colId);

private:
   int numSteps;
   int maxLayers;
   int numLayers;
   int maxConnections;
   int numConnections;

   float time;                  // current time in milliseconds
   float deltaTime;             // time step interval
   LayerLoc imageLoc;

   HyPerLayer ** layers;
   HyPerConn  ** connections;
<commit_msg>Fixed spelling bug (with imageLoc).<commit_after>/*
 * HyPerCol.h
 *
 *  Created on: Jul 30, 2008
 *      Author: rasmussn
 */

#ifndef HYPERCOL_HPP_
#define HYPERCOL_HPP_

#include "../layers/PVLayer.h"
#include "../connections/HyPerConn.hpp"
#include "../io/PVParams.hpp"
#include "../include/pv_types.h"

namespace PV {

class HyPerLayer;
class InterColComm;
class HyPerConn;

class HyPerCol {

public:

   HyPerCol(const char* name, int argc, char* argv[]);
   virtual ~HyPerCol();

   int initFinish(void); // call after all layers/connections have been added
   int initializeThreads();
   int finalizeThreads();

   int run(int nTimeSteps);
   int run_old(int nTimeSteps); // has thread usage that needs to be moved
   int run()            {return run(numSteps);}

   int loadState();
   int writeState();

   int columnId();
   const char * inputFile()              {return image_file;}

//   int deliver(PVConnection* conn, PVRect preRegion, int count, float* buf);

   int addLayer(HyPerLayer * l);
   int addConnection(HyPerConn * conn);

   HyPerLayer * getLayer(int which)       {return layers[which];}
   HyPerConn  * getConnection(int which)  {return connections[which];}

   InterColComm * icCommunicator()        {return icComm;}

   PVParams * parameters()                {return params;}

   float getDeltaTime()                   {return deltaTime;}
   float simulationTime()                 {return time;}

   LayerLoc getImageLoc()                 {return imageLoc;}
   float  width()                         {return imageLoc.nx;}
   float  height()                        {return imageLoc.ny;}

   int numberOfTimeSteps()                {return numSteps;}

   int numberOfColumns();

   int numberOfConnections()              {return numConnections;}

   /** returns the number of border regions, either an actual image border or a neighbor **/
   int numberOfBorderRegions()            {return MAX_NEIGHBORS;}

   int commColumn(int colId);
   int commRow(int colId);

private:
   int numSteps;
   int maxLayers;
   int numLayers;
   int maxConnections;
   int numConnections;

   float time;                  // current time in milliseconds
   float deltaTime;             // time step interval
   LayerLoc imageLoc;

   HyPerLayer ** layers;
   HyPerConn  ** connections;

{'fraction_non_alphanumeric': 0.10253607345867949, 'fraction_numerical': 0.0026235242675994755, 'mean_word_length': 2.557542768273717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5685920', 'n_tokens_mistral': 1402, 'n_tokens_neox': 1302, 'n_words': 400}