AdvancedOCR.SubsamplingWeights.PropogateForward C# (CSharp) Method

PropogateForward() protected method

protected PropogateForward ( RectangularStep upstream, int upstreamX, int upstreamY, int mapNumber ) : double
upstream RectangularStep
upstreamX int
upstreamY int
mapNumber int
return double
        protected double PropogateForward(RectangularStep upstream, int upstreamX, int upstreamY, int mapNumber)
        {
            Debug.Assert(upstreamX + Width <= upstream.Width);   // Check we are staying within the width limit of the step.
            Debug.Assert(upstreamY + Height <= upstream.Height);  // Check we are staying within the height limit of the step.

            double result = Bias;

            int upstreamIndex = (upstreamY * upstream.Width) + upstreamX;
            for (int y = 0; y < Height; y++)
            {
                for (int x = 0; x < Width; x++)
                {
                    result += upstream.Output[upstreamIndex] * Weight;
                    upstreamIndex += 1;
                }
                upstreamIndex += upstream.Width - Width;
            }
            return result;
        }

Same methods

SubsamplingWeights::PropogateForward ( RectangularStep downstream, int mapNumber ) : void