/*
 * VisibleLayer.hpp
 *
 *  Created on: 21.09.2014
 *      Author: jens
 */

#ifndef VISIBLELAYER_HPP_
#define VISIBLELAYER_HPP_

#include "Layer.hpp"
#include <cmath>

class VisibleLayer : public Layer
{
public:
	VisibleLayer(uint32_t numUnits = 0, const VectorXd *pStatesInit = nullptr)
	: Layer(numUnits, pStatesInit)
	{
	}

	virtual ~VisibleLayer()
	{
	}

private:
	double accum(Layer &layer, Weights &weights, uint32_t index)
	{
		double sum = ((Weights&)weights).visibleBias()[index];

		sum += ((Weights&)weights).weights().row(index) * layer.states();

		return sum;
	}
};

#endif /* VISIBLELAYER_HPP_ */
