<commit_before>/*
 * Gratings.hpp
 *
 *  Created on: Oct 23, 2009
 *      Author: travel
 */

#ifndef BARS_HPP_
#define BARS_HPP_

#include "Image.hpp"

namespace PV {

enum or_modes {vertical, horizontal};

class Bars : public PV::Image {
public:
   Bars(const char * name, HyPerCol * hc);
   virtual ~Bars();
   void setProbSwitch(float p) {pSwitch = p;}
   void setProbMove(float p) {pMove = p;}
   virtual bool updateImage(float time, float dt);

protected:

   void calcPosition(float step);
   int   writeImages;
   float position;
   float lastPosition;
   or_modes orientation;
   or_modes lastOrientation;
   float pSwitch;
   float pMove;
};

}

#endif /* BARS_HPP_ */<commit_msg>Bars class with options to randomly switch between vertical and horizontal bars and to randomly change the phase (position) of the bars. There are also options to choose between random walk, and random jump positions or to move position forward or backward. All these options can be set in the params file.<commit_after>/*
 * Gratings.hpp
 *
 *  Created on: Oct 23, 2009
 *      Author: travel
 */

#ifndef BARS_HPP_
#define BARS_HPP_

#include "Image.hpp"

namespace PV {

enum or_modes {vertical, horizontal};

class Bars : public PV::Image {
public:
   Bars(const char * name, HyPerCol * hc);
   virtual ~Bars();
   void setProbSwitch(float p) {pSwitch = p;}
   void setProbMove(float p) {pMove = p;}
   virtual bool updateImage(float time, float dt);

protected:

   void calcPosition(float step);
   int   writeImages;
   float position;
   float lastPosition;
   or_modes orientation;
   or_modes lastOrientation;
   float pSwitch;
   float pMove;
   int random_walk;
   int move_forward;
   int move_backward;
   int random_jump;
};

}

#endif /* BARS_HPP_ */
{'fraction_non_alphanumeric': 0.09225512528473805, 'fraction_numerical': 0.00683371298405467, 'mean_word_length': 3.660477453580902, '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': '3175941', 'n_tokens_mistral': 600, 'n_tokens_neox': 554, 'n_words': 197}