Skip to content
Snippets Groups Projects
Commit a348bc57 authored by POLITO Guillermo Andres's avatar POLITO Guillermo Andres
Browse files

Removed unused InternalWinnerTakeAllConnection

parent e3e13619
No related branches found
No related tags found
No related merge requests found
package fr.univ_lille.cristal.emeraude.n2s3.features.builder.connection.types
import fr.univ_lille.cristal.emeraude.n2s3.core.NeuronConnection
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.{NeuronGroupRef, NeuronIterable}
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.connection.{Connection, InternalConnectionPolicy}
/**
* Created by falezp on 23/05/16.
*/
class InternalWinnerTakeAllConnection(inhibitorNeuron : () => NeuronConnection) extends InternalConnectionPolicy {
def generate(layer: NeuronIterable) = {
for{
(from, from_index) <- layer.toSeq.zipWithIndex
(to, to_index) <- layer.toSeq.zipWithIndex
if from_index != to_index
} yield {
Connection(to, from, Some(inhibitorNeuron()))
}
}
override def generate(layer: NeuronGroupRef): Traversable[Connection] = {
for{
(from, from_index) <- layer.neuronPaths.zipWithIndex
(to, to_index) <- layer.neuronPaths.zipWithIndex
if from_index != to_index
} yield {
Connection(to, from, Some(inhibitorNeuron()))
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment