AForge.Neuro.Learning.PerceptronLearning.PerceptronLearning C# (CSharp) Method

PerceptronLearning() public method

Initializes a new instance of the PerceptronLearning class.
Invalid nuaral network. It should have one layer only.
public PerceptronLearning ( ActivationNetwork network ) : System
network ActivationNetwork Network to teach.
return System
        public PerceptronLearning( ActivationNetwork network )
        {
            // check layers count
            if ( network.Layers.Length != 1 )
            {
                throw new ArgumentException( "Invalid nuaral network. It should have one layer only." );
            }

            this.network = network;
        }