Index: /proiecte/ParallelANN/BCMToolbox/BCM.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/BCM.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/BCM.cs	(revision 171)
@@ -0,0 +1,279 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Collections;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox
+{
+
+    #region Network
+    public class SynchronousBCMNetwork : FixedTraceableNetwork
+    {
+        
+        protected Func<double, double> __activation = null;
+        protected Func<double, double> __activationDerivative = null;
+        protected int __neuronCount = 0;
+        protected double __slidingThreshold = 0.0;
+
+        double __inertia = 0.8;
+        double[] __intermediaryPotentials = null;
+        double[,] __potentialsQueues = null;
+        double[] __memoryRegression = null;
+
+  
+        internal SynchronousBCMNetwork(int neuronCount, Func<double, double> newThreshold, Func<double, double> newThresholdDerivative, int newID)
+            : base(neuronCount, newID)
+        {
+            __activation = newThreshold;
+            __activationDerivative = newThresholdDerivative;
+            __neuronCount = neuronCount;
+            __intermediaryPotentials = new double[neuronCount];
+
+
+
+            // setup the memory trace function memoizer
+            __memoryRegression = new double[] { 1, 0.90483741803596, 0.818730753077982, 0.740818220681718, 0.670320046035639, 0.606530659712633, 0.548811636094027, 0.49658530379141, 0.449328964117222, 0.406569659740599, 0.367879441171442, 0.33287108369808, 0.301194211912202, 0.272531793034013, 0.246596963941606, 0.22313016014843, 0.201896517994655, 0.182683524052735, 0.165298888221587, 0.149568619222635 };
+            __slidingThreshold = 9.08618386468457;
+            //__slidingThreshold = 9;
+
+            /*
+            int memoryRegressionDepth = 0;
+            for (memoryRegressionDepth = 0; memoryRegressionDepth > -100; memoryRegressionDepth--)
+                if (memoryFunction(memoryRegressionDepth) < MEMORY_REGRESSION_THRESHOLD)
+                    break;
+
+            __memoryRegression = new double[-memoryRegressionDepth];
+            for (int i = 0; i > memoryRegressionDepth; i--)
+                __memoryRegression[-i] = memoryFunction(i); */
+
+            // setup the queues
+            __potentialsQueues = new double[__neuronCount, __memoryRegression.Length];
+        }
+
+        public override string Identification
+        {
+            get
+            {
+                return String.Format("Vanilla BCM #{0}", this.UID);
+            }
+        }
+
+        
+
+       
+
+        public double Inertia
+        {
+            get
+            {
+                return __inertia;
+            }
+
+            set
+            {
+                __inertia = value;
+            }
+        }
+
+
+        
+
+        #region Applying inputs and propagation
+       
+
+        public override void ApplyInputs(double[] newInputs)
+        {
+            lock (SyncRoot)
+            {
+                if (newInputs == null)
+                    throw new ArgumentNullException();
+
+                if (newInputs.Length != __neuronCount)
+                    throw new ArgumentException("Invalid input size. Expected: ", __neuronCount.ToString());
+
+                for (int i = 0; i < __neuronCount; i++)
+                    __potentials[i] += newInputs[i];
+            }
+
+            base.ApplyInputs(newInputs);
+        }
+
+
+        
+        public override void Propagate()
+        {
+            // calculate intermediary potentials
+            for (int i = 0; i < __neuronCount; i++)
+            {
+                __intermediaryPotentials[i] = 0.0;
+                for (int j = 0; j < __neuronCount; j++)
+                    if ((i != j) && !double.IsNaN(__weights[j, i]))
+                       __intermediaryPotentials[i] += __weights[j, i] * __potentials[j];
+                    
+
+                
+                __intermediaryPotentials[i] = __activation(__intermediaryPotentials[i]);
+                System.Diagnostics.Debug.Assert(!double.IsNaN(__intermediaryPotentials[i]));
+                System.Diagnostics.Debug.Assert(!double.IsInfinity(__intermediaryPotentials[i]));
+            }
+
+            lock (SyncRoot)
+            {
+                // update weights
+                int queueIdx = Ticks % __memoryRegression.Length;
+                for (int i = 0; i < __neuronCount; i++)
+                {
+                    // determine output threshold
+                    double outputThreshold = 0.0;
+                    double last = __intermediaryPotentials[i];
+                    for (int j = 0; j < __memoryRegression.Length; j++)
+                    {
+                        int idx = queueIdx - 1 - j + __memoryRegression.Length;
+                        idx %= __memoryRegression.Length;
+
+                        if (j >= Ticks) // not progressed this far yet
+                            outputThreshold += last * last * __memoryRegression[j];
+                        else
+                        {
+                            outputThreshold += __potentialsQueues[i, idx] * __potentialsQueues[i, idx] * __memoryRegression[j];
+                            last = __potentialsQueues[i, idx];
+                        }
+                    }
+                    outputThreshold *= 1 / __slidingThreshold;
+
+                    /*
+                    if (i == 50)
+                        System.Diagnostics.Debug.WriteLine(String.Format("{0} - {1}", __intermediaryPotentials[i], outputThreshold)); */
+
+                    // update weights
+                    for (int j = 0; j < __neuronCount; j++)
+                    {
+                        if ((i == j) || double.IsNaN(__weights[j, i])) continue;
+                     
+                        double delta = __intermediaryPotentials[i] * (__intermediaryPotentials[i] - outputThreshold);
+
+                        delta *= __potentials[j];                       
+                        delta *= __activationDerivative(__intermediaryPotentials[i]); // Intrator and Cooper
+                        /*
+                        if(0 != outputThreshold)
+                            delta /= outputThreshold; // Law and Cooper */
+                        delta *= __inertia; 
+                        System.Diagnostics.Debug.Assert(!double.IsNaN(delta));
+                        System.Diagnostics.Debug.Assert(!double.IsInfinity(delta));
+                        __weights[j, i] += delta;
+
+                        /*
+                        // additional constraint: connections preserve their exc/inh status
+                         * NOT A GOOD IDEA - network wide inhibition needs to be implemented as a process which does not influece calculus
+                        if (__weights[j, i] < 0)
+                        {
+                            __weights[j, i] -= delta;
+                            if (__weights[j, i] > 0)
+                                __weights[j, i] = -double.Epsilon;
+                        }
+                        else
+                        {
+                            __weights[j, i] += delta;
+                            if (__weights[j, i] < 0)
+                                __weights[j, i] = double.Epsilon;
+                        } */
+                    }
+                }
+
+
+                // update potentials and queues
+                for (int i = 0; i < __neuronCount; i++)
+                {
+                    __potentials[i] = __intermediaryPotentials[i];
+                    __potentialsQueues[i, queueIdx] = __potentials[i];
+                }
+
+
+                NormalizeWeights(2.0);
+            }
+
+            base.Propagate();
+        }
+      
+        #endregion
+
+       
+    }
+    #endregion
+
+    #region Factories
+    public class BCMFactory
+    {
+        static int __uid = 0;
+        public static TraceableNetwork BuildSyncSigmoidActivationNetwork(int nodesCount)
+        {
+            return new SynchronousBCMNetwork(
+                nodesCount,
+                x => 1.0 / (1 + Math.Exp(-x)), // threshold function
+                x => { double e = Math.Exp(-x); return e / ((1.0 + e) * (1.0 + e)); }, // derivative of the threshold
+                __uid++); // memory regression parameter
+        }
+
+        public static TraceableNetwork BuildSyncSigmoidActivationNetworkSparse(int nodesCount, Func<int, int, bool> weightExistenceFunction)
+        {
+            SynchronousBCMNetwork toRet = new SynchronousBCMNetwork(
+                nodesCount,
+                x => 1.0 / (1 + Math.Exp(-x)), // threshold function
+                x => { double e = Math.Exp(-x); return e / ((1.0 + e) * (1.0 + e)); }, // derivative of the threshold
+                __uid++);
+            
+            for (int i = 0; i < nodesCount; i++)
+                for (int j = 0; j < nodesCount; j++)
+                    if (!weightExistenceFunction(i, j))
+                        toRet[i, j] = double.NaN;
+
+            return toRet;
+        }
+
+        public static TraceableNetwork Reduce(TraceableNetwork toReduce, Func<int, int, bool> weightExistenceFunction)
+        {
+            for (int i = 0; i < toReduce.Count; i++)
+                for (int j = 0; j < toReduce.Count; j++)
+                    if (!weightExistenceFunction(i, j))
+                        toReduce[i, j] = double.NaN;
+            return toReduce;
+        }
+
+        
+        public static TraceableNetwork BuildSyncSigmoidActivationNetwork2(int nodesCount)
+        {
+            return new SynchronousBCMNetwork(
+                nodesCount,
+                x => 2.0 / (1 - Math.Exp(-2*x)) - 1.0, // threshold function
+                x => { double e = Math.Exp(-2*x); return 4.0* e / ((1 + e) * (1 + e)); }, // derivative of the threshold
+                __uid++
+               ); // memory regression parameter
+        }
+
+        public static TraceableNetwork BuildOja(int nodesCount)
+        {
+            return new SynchronousOjaNetwork(nodesCount,
+                __uid++);
+        }
+
+        public static TraceableNetwork BuildModel01(int nodesCount)
+        {
+            return new Model01(nodesCount,
+                __uid++);
+        }
+
+        /*
+        public static TraceableNetwork BuildSyncLinearActivationNetwork(int nodesCount, double slidingThreshold)
+        {
+            return new SynchronousBCMNetwork(
+                nodesCount,
+                x => x,
+                x => 1.0,
+                __uid++,
+                x => Math.Exp(x / slidingThreshold),
+                slidingThreshold);
+        } */
+    }
+    #endregion
+}
Index: /proiecte/ParallelANN/BCMToolbox/BCMToolbox.csproj
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/BCMToolbox.csproj	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/BCMToolbox.csproj	(revision 171)
@@ -0,0 +1,71 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{76B24E9B-BFC1-42CA-BBB0-5A61F1535F26}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>BCMToolbox</RootNamespace>
+    <AssemblyName>BCMToolbox</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Base.cs" />
+    <Compile Include="BCM.cs" />
+    <Compile Include="Hebbian2.cs" />
+    <Compile Include="Math.cs" />
+    <Compile Include="MultiHebbian.cs" />
+    <Compile Include="Oja.cs" />
+    <Compile Include="Para.cs" />
+    <Compile Include="Pipe.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Statistics\BasicStats.cs" />
+    <Compile Include="Statistics\Convergence.cs" />
+    <Compile Include="Stimuli\ConsistentExcitator.cs" />
+    <Compile Include="Stimuli\SimpleExcitator.cs" />
+    <Compile Include="Stimulus.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /proiecte/ParallelANN/BCMToolbox/Base.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Base.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Base.cs	(revision 171)
@@ -0,0 +1,491 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Collections;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox
+{
+    public interface INetwork : IEnumerable
+    {
+        int Count
+        {
+            get;
+        }
+
+        object SyncRoot
+        {
+            get;
+        }
+
+        double this[int indexer]
+        {
+            get;
+        }
+
+        double this[int from, int to]
+        {
+            get;
+        }
+
+        string Identification
+        {
+            get;
+        }
+
+        int UID
+        {
+            get;
+        }
+
+        int Ticks
+        {
+            get;
+        }
+
+        void Initialize(Func<int, int, double> initializerWeights, Func<int, double> initializerPotentials);
+        void Initialize(double hiBoundaryWeights, double hiBoundaryPotentials);
+        void ApplyInputs(double[] inputs);
+        void Propagate();
+
+        event EventHandler WeightsChanged;
+        event EventHandler PotentialsChanged;
+        event EventHandler TickProgress;
+    }
+
+    public interface INetworkMonitor
+    {
+        Func<INetwork, double[]> KernelFunction
+        {
+            get;
+        }
+
+        void RegisterNorm(double[] newNorm);
+    }
+
+
+    [Serializable]
+    public class NetworkState : INetwork
+    {
+        double[,] __weights = null;
+        double[] __outputs = null;
+        object __syncRoot = new object();
+        int __uid = 0;
+        int __ticks = 0;
+        string __ident = null;
+
+        public NetworkState(INetwork copyFrom)
+        {
+            __weights = new double[copyFrom.Count, copyFrom.Count];
+            __outputs = new double[copyFrom.Count];
+            __uid = copyFrom.UID;
+            __ident = copyFrom.Identification;
+            lock (copyFrom.SyncRoot)
+            {
+                __ticks = copyFrom.Ticks;
+                for (int i = 0; i < copyFrom.Count; i++)
+                {
+                    __outputs[i] = copyFrom[i];
+                    for (int j = 0; j < copyFrom.Count; j++)
+                        __weights[i, j] = copyFrom[i, j];
+                }
+            }
+
+
+        }
+
+        #region INetwork Members
+
+        public int Count
+        {
+            get
+            {
+                return __outputs.Length;
+            }
+        }
+
+        public object SyncRoot
+        {
+            get
+            {
+                return __syncRoot;
+            }
+        }
+
+        public double this[int indexer]
+        {
+            get
+            {
+                return __outputs[indexer];
+            }
+        }
+
+        public double this[int from, int to]
+        {
+            get
+            {
+                return __weights[from, to];
+            }
+        }
+
+        public string Identification
+        {
+            get
+            {
+                return __ident;
+            }
+        }
+
+        public int UID
+        {
+            get
+            {
+                return __uid;
+            }
+        }
+
+        public int Ticks
+        {
+            get
+            {
+                return __ticks;
+            }
+        }
+
+        public void Initialize(Func<int, int, double> initializerWeights, Func<int, double> initializerPotentials)
+        {
+            throw new NotSupportedException("This is but a lifeless clone.");
+        }
+
+        public void Initialize(double hiBoundaryWeights, double hiBoundaryPotentials)
+        {
+            throw new NotSupportedException("This is but a lifeless clone.");
+        }
+
+        public void ApplyInputs(double[] inputs)
+        {
+            throw new NotSupportedException("This is but a lifeless clone.");
+        }
+
+        public void Propagate()
+        {
+            throw new NotSupportedException("This is but a lifeless clone.");
+        }
+
+        public event EventHandler WeightsChanged;
+
+        public event EventHandler PotentialsChanged;
+
+        public event EventHandler TickProgress;
+
+        
+        #endregion
+
+        #region IEnumerable Members
+
+        public IEnumerator GetEnumerator()
+        {
+            return __outputs.GetEnumerator();
+        }
+
+        #endregion
+    }
+
+    public abstract class TraceableNetwork : INetwork
+    {
+        object __syncRoot = new object();
+        int __uid = 0;
+        int __ticks = 0;
+
+        protected TraceableNetwork(int newUID)
+        {
+            __uid = newUID;
+        }
+
+        public override string ToString()
+        {
+            StringBuilder toRet = new StringBuilder();
+            for (int i = 0; i < this.Count; i++)
+            {
+                toRet.AppendLine("");
+                toRet.AppendFormat("{0}   ->    ", this[i].ToString("#0.0000"));
+                for (int j = 0; j < this.Count; j++)
+                    toRet.AppendFormat("{0} ", this[i, j].ToString("#0.0000"));
+            }
+            toRet.AppendLine("");
+
+            return toRet.ToString();
+        }
+
+
+        #region Network State Duplicates
+        NetworkState __lastState = null;
+        public NetworkState BuildNetworkState()
+        {
+            __lastState = new NetworkState(this);
+            if (this.NetworkStateRefreshed != null)
+                this.NetworkStateRefreshed(this, EventArgs.Empty);
+            return __lastState;
+        }
+        public NetworkState GetLastNetworkState()
+        {
+            return __lastState;
+        }
+
+        public event EventHandler NetworkStateRefreshed;
+        #endregion
+
+        #region INetwork Members
+
+        public abstract int Count
+        {
+            get;
+        }
+
+        public object SyncRoot
+        {
+            get
+            {
+                return __syncRoot;
+            }
+        }
+
+        public abstract double this[int indexer]
+        {
+            get;
+            internal set;
+        }
+
+        public abstract double this[int from, int to]
+        {
+            get;
+            internal set;
+        }
+
+        public abstract string Identification
+        {
+            get;
+        }
+
+        public int UID
+        {
+            get
+            {
+                return __uid;
+            }
+        }
+
+        public int Ticks
+        {
+            get
+            {
+                return __ticks;
+            }
+        }
+
+        public virtual void Initialize(Func<int, int, double> initializerWeights, Func<int, double> initializerPotentials)
+        {
+            lock (SyncRoot)
+            {
+                for (int i = 0; i < this.Count; i++)
+                    for (int j = 0; j < Count; j++)
+                        if (!double.IsNaN(this[i, j]))
+                            this[i, j] = initializerWeights(i, j);
+                for (int i = 0; i < this.Count; i++)
+                    this[i] = initializerPotentials(i);
+            }
+
+            __ticks = 0;
+            if (this.PotentialsChanged != null)
+                this.PotentialsChanged(this, EventArgs.Empty);
+            if (this.WeightsChanged != null)
+                this.WeightsChanged(this, EventArgs.Empty);
+        }
+
+                 
+        // Initializes using a uniform random number distribution with two boundaries
+        public void Initialize(double hiBoundaryWeights, double hiBoundaryPotentials)
+        {
+            Random r = new Random();
+            Initialize(
+               //   (i, j) => (r.NextDouble() * 2 * hiBoundaryWeights - hiBoundaryWeights), i => (r.NextDouble() * hiBoundaryPotentials));
+              (i, j) => (r.NextDouble() * hiBoundaryWeights), i => (r.NextDouble() * hiBoundaryPotentials));
+        }
+        
+
+        public virtual void ApplyInputs(double[] inputs)
+        {
+            this.OnPotentialsChanged();
+        }
+
+
+        public virtual void Propagate()
+        {
+            __ticks++;
+            this.OnPotentialsChanged();
+            this.OnWeightsChanged();
+            this.OnTickProgress();
+            
+
+            UpdateMonitors();
+        }
+
+        protected void OnPotentialsChanged()
+        {
+            if (this.PotentialsChanged != null)
+                this.PotentialsChanged(this, EventArgs.Empty);
+        }
+
+        protected void OnWeightsChanged()
+        {
+            if (this.WeightsChanged != null)
+                this.WeightsChanged(this, EventArgs.Empty);
+        }
+
+        protected void OnTickProgress()
+        {
+            if (this.TickProgress != null)
+                this.TickProgress(this, EventArgs.Empty);
+        }
+
+        public event EventHandler WeightsChanged;
+
+        public event EventHandler PotentialsChanged;
+
+        public event EventHandler TickProgress;
+
+        #endregion
+
+        #region IEnumerable Members
+
+        public abstract IEnumerator GetEnumerator();
+      
+
+        #endregion
+
+        #region Graphing With Kernels
+        List<INetworkMonitor> __monitors = new List<INetworkMonitor>();
+
+        public void RegisterMonitor(INetworkMonitor newMonitor)
+        {
+            lock (__syncRoot)
+                __monitors.Add(newMonitor);
+        }
+
+        void UpdateMonitors()
+        {
+            foreach (INetworkMonitor inm in __monitors)
+            {
+                double[] norm = inm.KernelFunction(this);
+                inm.RegisterNorm(norm);
+            }
+        }
+
+
+        #endregion
+
+        #region Utilities
+        public void NormalizeWeights(double degree)
+        {
+            double sum = 0.0;
+
+            if (degree != 2.0)
+            {
+                for (int i = 0; i < Count; i++)
+                    for (int j = 0; j < Count; j++)
+                        if ((i != j) && !double.IsNaN(this[i, j]))
+                            sum += Math.Pow(this[i, j], degree);
+
+                sum = Math.Pow(sum, 1 / degree);
+            }
+            else
+            {
+                for (int i = 0; i < Count; i++)
+                    for (int j = 0; j < Count; j++)
+                        if ((i != j) && !double.IsNaN(this[i, j]))
+                            sum += this[i,j]*this[i,j];
+
+                sum = Math.Sqrt(sum);
+            }
+
+            for (int i = 0; i < Count; i++)
+                for (int j = 0; j < Count; j++)
+                    if ((i != j) && !double.IsNaN(this[i, j]))
+                        this[i, j] = this[i, j] / sum;
+
+        }
+
+        public void NormalizePotentials(double degree)
+        {
+            double sum = 0.0;
+
+            if (degree != 2.0)
+            {
+                for (int i = 0; i < Count; i++)
+                    sum += Math.Pow(this[i], degree);
+
+                sum = Math.Pow(sum, 1 / degree);
+            }
+            else
+            {
+                for (int i = 0; i < Count; i++)
+                    sum += this[i] * this[i];
+
+                sum = Math.Sqrt(sum);
+            }
+
+            for (int i = 0; i < Count; i++)
+                this[i] = this[i] / sum;
+        }
+        #endregion
+    }
+
+    public abstract class FixedTraceableNetwork : TraceableNetwork
+    {
+        protected double[,] __weights = null;
+        protected double[] __potentials = null;
+        protected FixedTraceableNetwork(int neuronCount, int newUID)
+            : base(newUID)
+        {
+            __weights = new double[neuronCount, neuronCount];
+            __potentials = new double[neuronCount];
+        }
+
+        public override int Count
+        {
+            get
+            {
+                return __potentials.Length;
+            }
+        }
+
+        public override double this[int indexer]
+        {
+            get
+            {
+                return __potentials[indexer];
+            }
+            internal set
+            {
+                __potentials[indexer] = value;
+            }
+        }
+
+        public override double this[int from, int to]
+        {
+            get
+            {
+                return __weights[from, to];
+            }
+            internal set
+            {
+                __weights[from, to] = value;
+            }
+        }
+
+        public override System.Collections.IEnumerator GetEnumerator()
+        {
+            return __potentials.GetEnumerator();
+        }
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/Hebbian2.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Hebbian2.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Hebbian2.cs	(revision 171)
@@ -0,0 +1,184 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox
+{
+
+    #region Hebbian2 Base
+    public abstract class SynchronousHebbian2Network : FixedTraceableNetwork
+    {
+        double[] __intermediaryOutputs = null;
+        
+
+        protected Func<double, double> __activation = MathToolbox.Sigmoid;
+        protected Func<double, double> __activation_inverse = MathToolbox.InverseSigmoid;
+
+        public SynchronousHebbian2Network(int neuronCount, int newID)
+            : base(neuronCount, newID)
+        {
+            __intermediaryOutputs = new double[neuronCount];
+        }
+
+      
+        public override string Identification
+        {
+            get
+            {
+                return String.Format("Hebb2 Layer #{0}", this.UID);
+            }
+        }
+
+        public virtual double Inertia
+        {
+            get
+            {
+                return 0.02;
+            }
+        }
+
+        public virtual double OutputDecay
+        {
+            get
+            {
+                return 0.85;
+            }
+        }
+
+        protected abstract double WeightModificationKernel(double weight, double input, double output);
+       
+
+        public virtual bool HasNormalizedWeights
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        public virtual bool HasNormalizedInputs
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+       
+
+        public override void ApplyInputs(double[] inputs)
+        {
+            lock (SyncRoot)
+            {
+                if (inputs == null)
+                    throw new ArgumentNullException();
+
+                if (inputs.Length != this.Count)
+                    throw new ArgumentException("Invalid input size. Expected: ", this.Count.ToString());
+
+                for (int i = 0; i < this.Count; i++)
+                    __potentials[i] += inputs[i];
+            }
+
+            if(HasNormalizedInputs)
+                NormalizePotentials(2.0);
+            
+            base.ApplyInputs(inputs);
+        }
+
+
+        public override void Propagate()
+        {
+            // calculate outputs
+            for (int i = 0; i < this.Count; i++)
+            {
+                __intermediaryOutputs[i] = 0.0;
+                for (int j = 0; j < this.Count; j++)
+                    if ((i != j) && !double.IsNaN(__weights[j, i]))
+                        __intermediaryOutputs[i] += __weights[j, i] * __potentials[j];
+                __intermediaryOutputs[i] = __activation(__intermediaryOutputs[i]);
+            }
+
+            if (HasNormalizedInputs)
+            {
+                double[] temp = __potentials;
+                __potentials = __intermediaryOutputs;
+                NormalizePotentials(2.0);
+                __potentials = temp;
+            }
+
+            // update weights and lock outputs
+            lock (SyncRoot)
+            {               
+                for (int i = 0; i < this.Count; i++)
+                    for (int j = 0; j < this.Count; j++)
+                    {
+                        if ((i == j) || double.IsNaN(__weights[i, j]))
+                            continue;
+
+                        __weights[i,j] = WeightModificationKernel(__weights[i, j], __potentials[i], __intermediaryOutputs[j]);
+
+
+                        System.Diagnostics.Debug.Assert(!double.IsNaN(__weights[i, j]));
+                        System.Diagnostics.Debug.Assert(!double.IsInfinity(__weights[i, j]));
+
+
+                        
+                    }
+                
+                if(HasNormalizedWeights)
+                    NormalizeWeights(2.0);
+
+                for (int i = 0; i < this.Count; i++)
+                    __potentials[i] = __intermediaryOutputs[i] * OutputDecay;
+            }
+           
+            base.Propagate();
+        }
+
+        public override void Initialize(Func<int, int, double> initializerWeights, Func<int, double> initializerPotentials)
+        {
+            base.Initialize(initializerWeights, initializerPotentials);
+            if(HasNormalizedInputs)
+                NormalizePotentials(2.0);
+
+            if (HasNormalizedWeights)
+                NormalizeWeights(2.0);
+        }
+    }
+
+    #endregion
+
+    // 0->0 (--), 1->0 (+), 1->1 (++), 0->1 (-)
+    #region Model 01 
+    public class Model01 : SynchronousHebbian2Network
+    {
+        const double EXC_THRESHOLD = 0.5;
+        const double MEMORY_CONSTANT = 2.5;
+        public Model01(int neuronCount, int newID)
+            : base(neuronCount, newID)
+        {
+        }
+
+        protected override double WeightModificationKernel(double weight, double input, double output)
+        {
+            double unpacked = __activation_inverse(weight);
+            unpacked += Math.Sign(input - EXC_THRESHOLD)*Math.Pow(Math.Abs(input - EXC_THRESHOLD), MEMORY_CONSTANT) * (1 - Math.Abs(input - output)) * Inertia;
+            unpacked = __activation(unpacked);
+            
+
+            
+            return unpacked;
+        }
+
+        public override double Inertia
+        {
+            get
+            {
+                return 0.02;
+            }
+        }
+    }
+    #endregion
+}
Index: /proiecte/ParallelANN/BCMToolbox/Math.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Math.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Math.cs	(revision 171)
@@ -0,0 +1,45 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox
+{
+    public static class MathToolbox
+    {
+        static Random r = new Random();
+        // returns a random gaussian with mean 0 and sigma 1
+        public static double GetRandomGaussian()
+        {
+            double x1, x2, w, y1, y2;
+
+            do
+            {
+                x1 = 2.0 * r.NextDouble() - 1.0;
+                x2 = 2.0 * r.NextDouble() - 1.0;
+                w = x1 * x1 + x2 * x2;
+            } while (w >= 1.0);
+
+            w = Math.Sqrt((-2.0 * Math.Log(w, Math.E)) / w);
+            y1 = x1 * w;
+            y2 = x2 * w;
+            return y1;
+        }
+
+        public static Func<double, double> Sigmoid
+        {
+            get
+            {
+                return x => 1 / (1 + Math.Exp(-x));
+            }
+        }
+
+        public static Func<double, double> InverseSigmoid
+        {
+            get
+            {
+                return (y => -Math.Log((1 - y) / y, Math.E));
+            }
+        }
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/MultiHebbian.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/MultiHebbian.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/MultiHebbian.cs	(revision 171)
@@ -0,0 +1,200 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox
+{
+    [Serializable]
+    public class WeightUpdateMessage : LocalMessage
+    {
+        public int[] Index = new int[] { 0, 0 };
+
+        public WeightUpdateMessage()
+            : base(WEIGHT_UPDATE)
+        {
+        }
+
+        public const string WEIGHT_UPDATE = "W Update";
+    }
+
+    [Serializable]
+    public class OutputUpdateMessage : LocalMessage
+    {
+        public int Index = 0;
+        public const string OUTPUT_UPDATE = "OUT Update";
+
+        public OutputUpdateMessage()
+            : base(OUTPUT_UPDATE)
+        {
+        }
+    }
+
+    public abstract class SynchronousHebbian3Network : FixedTraceableNetwork
+    {
+        double[] __intermediaryOutputs = null;
+        int[] __liveOutputs = null;
+        List<LocalPipe> __outputPipes = new List<LocalPipe>();
+
+        protected Func<double, double> __activation = MathToolbox.Sigmoid;
+        protected Func<double, double> __activation_inverse = MathToolbox.InverseSigmoid;
+
+        internal SynchronousHebbian3Network(int neuronCount, int newID, int[] liveOutputs)
+            : base(neuronCount, newID)
+        {
+            __intermediaryOutputs = new double[neuronCount];
+            __liveOutputs = liveOutputs;
+            foreach (int lo in __liveOutputs)
+                if (lo >= neuronCount)
+                    throw new IndexOutOfRangeException();
+        }
+
+        internal void LinkPipe(LocalPipe inbound)
+        {
+            inbound.MessageReceive += new EventHandler<LocalMessageEventArgs>(inbound_MessageReceive);
+        }        
+
+        internal LocalPipe RegisterOtherNetwork(SynchronousHebbian3Network newNetwork)
+        {
+            if (newNetwork == this)
+                return null;
+
+            LocalPipe pipe = new LocalPipe();
+            __outputPipes.Add(pipe);
+            return pipe;
+        }
+
+        void inbound_MessageReceive(object sender, LocalMessageEventArgs e)
+        {
+            if (e.Message.MessageType != WeightUpdateMessage.WEIGHT_UPDATE)
+                return;
+
+            // ref message
+        }
+
+        public override string Identification
+        {
+            get
+            {
+                return String.Format("HebbM Layer #{0}", this.UID);
+            }
+        }
+
+        public virtual double Inertia
+        {
+            get
+            {
+                return 0.02;
+            }
+        }
+
+        public virtual double OutputDecay
+        {
+            get
+            {
+                return 0.85;
+            }
+        }
+
+        protected abstract double WeightModificationKernel(double weight, double input, double output);
+
+
+        public virtual bool HasNormalizedWeights
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        public virtual bool HasNormalizedInputs
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+
+
+        public override void ApplyInputs(double[] inputs)
+        {
+            lock (SyncRoot)
+            {
+                if (inputs == null)
+                    throw new ArgumentNullException();
+
+                if (inputs.Length != this.Count)
+                    throw new ArgumentException("Invalid input size. Expected: ", this.Count.ToString());
+
+                for (int i = 0; i < this.Count; i++)
+                    __potentials[i] += inputs[i];
+            }
+
+            if (HasNormalizedInputs)
+                NormalizePotentials(2.0);
+
+            base.ApplyInputs(inputs);
+        }
+
+
+        public override void Propagate()
+        {
+            // calculate outputs
+            for (int i = 0; i < this.Count; i++)
+            {
+                __intermediaryOutputs[i] = 0.0;
+                for (int j = 0; j < this.Count; j++)
+                    if ((i != j) && !double.IsNaN(__weights[j, i]))
+                        __intermediaryOutputs[i] += __weights[j, i] * __potentials[j];
+                __intermediaryOutputs[i] = __activation(__intermediaryOutputs[i]);
+            }
+
+            if (HasNormalizedInputs)
+            {
+                double[] temp = __potentials;
+                __potentials = __intermediaryOutputs;
+                NormalizePotentials(2.0);
+                __potentials = temp;
+            }
+
+            // update weights and lock outputs
+            lock (SyncRoot)
+            {
+                for (int i = 0; i < this.Count; i++)
+                    for (int j = 0; j < this.Count; j++)
+                    {
+                        if ((i == j) || double.IsNaN(__weights[i, j]))
+                            continue;
+
+                        __weights[i, j] = WeightModificationKernel(__weights[i, j], __potentials[i], __intermediaryOutputs[j]);
+
+
+                        System.Diagnostics.Debug.Assert(!double.IsNaN(__weights[i, j]));
+                        System.Diagnostics.Debug.Assert(!double.IsInfinity(__weights[i, j]));
+
+
+
+                    }
+
+                if (HasNormalizedWeights)
+                    NormalizeWeights(2.0);
+
+                for (int i = 0; i < this.Count; i++)
+                    __potentials[i] = __intermediaryOutputs[i] * OutputDecay;
+            }
+
+            base.Propagate();
+        }
+
+        public override void Initialize(Func<int, int, double> initializerWeights, Func<int, double> initializerPotentials)
+        {
+            base.Initialize(initializerWeights, initializerPotentials);
+            if (HasNormalizedInputs)
+                NormalizePotentials(2.0);
+
+            if (HasNormalizedWeights)
+                NormalizeWeights(2.0);
+        }
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/Oja.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Oja.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Oja.cs	(revision 171)
@@ -0,0 +1,105 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox
+{
+    public class SynchronousOjaNetwork : FixedTraceableNetwork
+    {
+        double[] __intermediaryOutputs = null;
+        double __inertia = 0.005;
+        public SynchronousOjaNetwork(int neuronCount, int newID)
+            : base(neuronCount, newID)
+        {
+            __intermediaryOutputs = new double[neuronCount];
+        }
+
+      
+        public override string Identification
+        {
+            get
+            {
+                return String.Format("Oja Layer #{0}", this.UID);
+            }
+        }
+
+        public double Inertia
+        {
+            get
+            {
+                return __inertia;
+            }
+            set
+            {
+                __inertia = value;
+            }
+        }
+
+       
+
+        public override void ApplyInputs(double[] inputs)
+        {
+            lock (SyncRoot)
+            {
+                if (inputs == null)
+                    throw new ArgumentNullException();
+
+                if (inputs.Length != this.Count)
+                    throw new ArgumentException("Invalid input size. Expected: ", this.Count.ToString());
+
+                for (int i = 0; i < this.Count; i++)
+                    __potentials[i] += inputs[i];
+            }
+            
+            base.ApplyInputs(inputs);
+        }
+
+
+        public override void Propagate()
+        {
+            // calculate outputs
+            for (int i = 0; i < this.Count; i++)
+            {
+                __intermediaryOutputs[i] = 0.0;
+                for (int j = 0; j < this.Count; j++)
+                    if ((i != j) && !double.IsNaN(__weights[j, i]))
+                        __intermediaryOutputs[i] += __weights[j, i] * __potentials[j];
+            }
+
+            // update weights and lock outputs
+            lock (SyncRoot)
+            {               
+                for (int i = 0; i < this.Count; i++)
+                    for (int j = 0; j < this.Count; j++)
+                    {
+                        if ((i == j) || double.IsNaN(__weights[i, j]))
+                            continue;
+
+                        double delta = __intermediaryOutputs[j];
+                        delta *= __inertia;
+                        delta *= __potentials[i] - __intermediaryOutputs[j] * __weights[i, j];
+
+                        System.Diagnostics.Debug.Assert(!double.IsNaN(delta));
+                        System.Diagnostics.Debug.Assert(!double.IsInfinity(delta));
+
+                        __weights[i, j] += delta;
+                    }
+                //NormalizeWeights(2.0);
+
+                for (int i = 0; i < this.Count; i++)
+                    __potentials[i] = __intermediaryOutputs[i];
+            }
+           
+            base.Propagate();
+        }
+
+        public override void Initialize(Func<int, int, double> initializerWeights, Func<int, double> initializerPotentials)
+        {
+            base.Initialize(initializerWeights, initializerPotentials);
+            NormalizeWeights(2.0);
+        }
+    }
+
+    
+}
Index: /proiecte/ParallelANN/BCMToolbox/Para.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Para.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Para.cs	(revision 171)
@@ -0,0 +1,137 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+
+namespace BCMToolbox
+{
+    /*
+     * Connects Hebbian3 networks with message pipes and handles execution in parallel.
+     */
+    public abstract class ParallelHebbian3Executive : IDisposable
+    {
+        /// <summary>
+        /// Classes which inherit this build different network configurations.
+        /// </summary>        
+        protected abstract SynchronousHebbian3Network BuildNetwork();
+
+        int __processorCount = 0;
+        List<SynchronousHebbian3Network> __networks = new List<SynchronousHebbian3Network>();
+        List<Thread> __executionThreads = new List<Thread>();
+        bool __started = false;
+        ManualResetEvent __mainSync = new ManualResetEvent(false);
+        int __waiting = 0;
+        object __syncRoot = new object();
+
+        public ParallelHebbian3Executive(int newProcessorCount)
+        {
+            __processorCount = newProcessorCount;
+        }
+
+        public ParallelHebbian3Executive()
+            : this(Environment.ProcessorCount)
+        {
+        }
+
+        public void Initialize()
+        {
+            for (int i = 0; i < __processorCount; i++)            
+                __networks.Add(BuildNetwork());
+
+            // bind message-passing pipes
+            for(int i = 0; i < __networks.Count; i++)
+                for (int j = i + 1; j < __networks.Count; j++)
+                {
+                    LocalPipe pipe = __networks[i].RegisterOtherNetwork(__networks[j]);
+                    __networks[j].LinkPipe(pipe);
+                }
+
+            // create execution threads
+            for (int i = 0; i < __networks.Count; i++)
+            {
+                Thread th = new Thread(
+                    new ParameterizedThreadStart(this.runNetwork));
+                __executionThreads.Add(th);
+                th.IsBackground = true;
+            }
+        }
+
+        public object SyncRoot
+        {
+            get
+            {
+                return __syncRoot;
+            }
+        }
+
+        void runNetwork(object net)
+        {
+            SynchronousHebbian3Network network = net as SynchronousHebbian3Network;
+            while (true)
+            {
+                bool wait = false;
+                network.Propagate();
+                lock (this)
+                {
+                    if (__waiting == (__processorCount - 1)) // all have finished
+                    {
+                        __waiting = 0;
+                        __mainSync.Set();
+                        __mainSync.Reset();
+                    }
+                    else
+                    {
+                        wait = true;
+                        __waiting++;
+                    }
+                }
+                
+                if (wait)
+                    __mainSync.WaitOne();
+            }
+        }
+
+        public int Count
+        {
+            get
+            {
+                return __processorCount;
+            }
+        }
+
+        public void Start()
+        {
+            if (__started)
+                throw new NotSupportedException("Execution has already started.");
+
+            for (int i = 0; i < __executionThreads.Count; i++)
+                __executionThreads[i].Start(__networks[i]);
+
+            __started = true;
+        }
+
+        public void Stop()
+        {
+            if (!__started)
+                return;
+
+            for (int i = 0; i < __executionThreads.Count; i++)
+                if ((__executionThreads[i].ThreadState == ThreadState.Running) ||
+                    (__executionThreads[i].ThreadState == ThreadState.WaitSleepJoin))
+                    __executionThreads[i].Abort();
+        }
+
+
+
+        #region IDisposable Members
+
+        public void Dispose()
+        {
+            if (__started)
+                Stop();
+        }
+
+        #endregion
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/Pipe.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Pipe.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Pipe.cs	(revision 171)
@@ -0,0 +1,93 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox
+{
+    [Serializable]
+    public abstract class LocalMessage
+    {
+        public readonly string MessageType = null;
+
+        protected LocalMessage(string newType)
+        {
+            MessageType = newType;
+        }
+
+        public override string ToString()
+        {
+            return MessageType;
+        }
+    }
+
+    public class LocalMessageEventArgs : EventArgs
+    {
+        LocalMessage __message = null;
+        public LocalMessageEventArgs(LocalMessage newMessage)
+        {
+            __message = newMessage;
+        }
+
+        public LocalMessage Message
+        {
+            get
+            {
+                return __message;
+            }
+        }
+    }
+
+    public class LocalPipe
+    {
+        Dictionary<string, int> __messageCount = new Dictionary<string, int>();
+        object __syncRoot = new object();
+
+
+        public object SyncRoot
+        {
+            get
+            {
+                return __syncRoot;
+            }
+        }
+
+        public void ResetPipe()
+        {
+            __messageCount.Clear();
+        }
+
+        public int this[string MessageType]
+        {
+            get
+            {
+                if (!__messageCount.ContainsKey(MessageType))
+                    return 0;
+                return __messageCount[MessageType];
+            }
+        }
+
+        public bool SendMessage(LocalMessage theMessage)
+        {
+            lock (__syncRoot)
+            {
+                if (!__messageCount.ContainsKey(theMessage.MessageType))
+                    __messageCount.Add(theMessage.MessageType, 0);
+
+                int count = __messageCount[theMessage.MessageType];
+                count++;
+                __messageCount[theMessage.MessageType] = count;
+            }
+
+            if (this.MessageReceive != null)
+            {
+                this.MessageReceive(this, new LocalMessageEventArgs(theMessage));
+                return true;
+            }
+            else
+                return false;
+        }
+
+        public event EventHandler<LocalMessageEventArgs> MessageReceive;
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/Properties/AssemblyInfo.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Properties/AssemblyInfo.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Properties/AssemblyInfo.cs	(revision 171)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("BCMToolbox")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("BCMToolbox")]
+[assembly: AssemblyCopyright("Copyright ©  2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c81fbb09-b877-46ee-97c2-25f17c37d96f")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /proiecte/ParallelANN/BCMToolbox/Statistics/BasicStats.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Statistics/BasicStats.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Statistics/BasicStats.cs	(revision 171)
@@ -0,0 +1,79 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox.Statistics
+{
+    [Serializable]
+    public class BasicStats
+    {
+        public readonly double AverageWeight = 0.0;
+        public readonly double AveragePotential = 0.0;
+
+        public readonly double MinWeight = double.MaxValue;
+        public readonly double MaxWeight = double.MinValue;
+        public readonly double Weight2Norm = 0.0;
+
+        public readonly double StddevWeight = 0.0;
+        public readonly double StddevPotential = 0.0;
+
+
+        public BasicStats(INetwork net)
+        {
+            int validWeights = 0;
+            for (int i = 0; i < net.Count; i++)
+            {
+                AveragePotential += net[i];
+                for (int j = 0; j < net.Count; j++)
+                    if (!double.IsNaN(net[i, j]))
+                    {
+                        AverageWeight += net[i, j];
+                        Weight2Norm += net[i, j] * net[i, j];
+                        if (net[i, j] < MinWeight)
+                            MinWeight = net[i, j];
+                        if (net[i, j] > MaxWeight)
+                            MaxWeight = net[i, j];
+                        validWeights++;
+                    }
+            }
+
+            AveragePotential /= net.Count;
+            AverageWeight /= validWeights;
+
+            for (int i = 0; i < net.Count; i++)
+            {
+                double p = net[i] - AveragePotential;
+                p *= p;
+                StddevPotential += p;
+
+                for (int j = 0; j < net.Count; j++)
+                    if(!double.IsNaN(net[i,j]))
+                    {
+                        p = net[i, j] - AverageWeight;
+                        p *= p;
+                        StddevWeight += p;
+                    }
+            }
+
+            Weight2Norm = Math.Sqrt(Weight2Norm);
+
+            StddevPotential = Math.Sqrt(StddevPotential);
+            StddevPotential /= net.Count;
+
+            StddevWeight = Math.Sqrt(StddevWeight);
+            StddevWeight /= validWeights;
+        }
+
+        public override string ToString()
+        {
+            return String.Format("ave wt: {0} | stddev wt: {2} | wt range: {4} | wt norm2: {5} | ave out: {1} | stddev out: {3}",
+                AverageWeight.ToString("#0.0000"),
+                AveragePotential.ToString("#0.0000"),
+                StddevWeight.ToString("#0.0000"),
+                StddevPotential.ToString("#0.0000"),
+                (MaxWeight - MinWeight).ToString("#0.0000"),
+                Weight2Norm.ToString("#0.0000"));
+        }
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/Statistics/Convergence.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Statistics/Convergence.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Statistics/Convergence.cs	(revision 171)
@@ -0,0 +1,46 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox.Statistics
+{
+    [Serializable]
+    public class StaticBoundessTest
+    {
+        public readonly bool WeightsBounded = true;
+        public readonly bool PotentialsBounded = true;
+
+
+        public StaticBoundessTest(INetwork net, int testRuns, int testLength)
+        {
+            for (int i = 0; i < testRuns; i++)
+            {
+                net.Initialize(0.10, 0.50);
+                for (int j = 0; j < testLength; j++)
+                    net.Propagate();
+
+                BasicStats bs1 = new BasicStats(net);
+                net.Propagate();
+                BasicStats bs2 = new BasicStats(net);
+                if (Math.Abs(bs1.AverageWeight - bs2.AverageWeight) > (0.005 * bs1.AverageWeight))
+                    WeightsBounded = false;
+
+                if (Math.Abs(bs1.AveragePotential - bs2.AveragePotential) > (0.05 * bs1.AveragePotential))
+                    PotentialsBounded = false;
+            }
+        }
+
+        public StaticBoundessTest(INetwork net)
+            : this(net, 5, 100)
+        {
+        }
+
+        public override string ToString()
+        {
+            return String.Format("wt bounded: {0} | out bounded: {1}",
+                WeightsBounded.ToString(),
+                PotentialsBounded.ToString());
+        }
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/Stimuli/ConsistentExcitator.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Stimuli/ConsistentExcitator.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Stimuli/ConsistentExcitator.cs	(revision 171)
@@ -0,0 +1,51 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox.Stimuli
+{
+    public class ConsistentExcitator : StimulatorBase
+    {
+        public const string CE_INTERVALS = "CE Intervals";
+        public const string CE_MAXSTRENGTH = "CE Max Strength";
+        public const string CE_MINSTRENGTH = "CE Min Strength";
+        public const string CE_WIDTH = "CE Interval Width";
+        Random r = new Random();
+
+        public override string[] GetParameters()
+        {
+            return new string[] {
+                STIMULUS_LENGTH,
+                STIMULUS_START,
+                CE_INTERVALS,
+                CE_MAXSTRENGTH,
+                CE_MINSTRENGTH,
+                CE_WIDTH};
+        }
+
+        protected override void Apply()
+        {
+            int intervals = (int)__parameters[CE_INTERVALS];
+            int width = (int)__parameters[CE_WIDTH];
+
+            double maxStrength = GetDouble(__parameters[CE_MAXSTRENGTH]);
+            double minStrength = GetDouble(__parameters[CE_MINSTRENGTH]);
+           
+
+            double[] allChannels = new double[this.Bound.Count];
+
+            int intervalWidth = this.Bound.Count / intervals;
+
+            for (int i = 0; i < intervals; i++)
+            {
+                int intervalStart = i * intervalWidth;
+                intervalStart += (intervalWidth - width) / 2;
+                for (int j = 0; j < width; j++)
+                    allChannels[intervalStart + j] = r.NextDouble() * (maxStrength-minStrength) + minStrength;
+            }
+
+            this.Bound.ApplyInputs(allChannels);
+        }
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/Stimuli/SimpleExcitator.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Stimuli/SimpleExcitator.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Stimuli/SimpleExcitator.cs	(revision 171)
@@ -0,0 +1,49 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox.Stimuli
+{
+    public class SimpleExcitator : StimulatorBase
+    {
+        public const string EXC_CHANNELS = "Excitator Channels";
+        public const string EXC_STRENGTH = "Excitator Strength";
+        public override string[] GetParameters()
+        {
+            return new string[] {
+                STIMULUS_LENGTH,
+                STIMULUS_START,
+                EXC_CHANNELS,
+                EXC_STRENGTH };
+
+        }
+
+        protected override void Apply()
+        {
+            List<int> channels = null;
+            if (__parameters[EXC_CHANNELS] is int[])
+                channels = new List<int>(__parameters[EXC_CHANNELS] as int[]);
+            else if (__parameters[EXC_CHANNELS] is int)
+            {
+                channels = new List<int>();
+                channels.Add((int)__parameters[EXC_CHANNELS]);
+            }
+            else
+                throw new NotSupportedException("Invalid channels");
+
+            double strength = 0.0;
+            if(__parameters[EXC_STRENGTH] is int)
+                strength = (int)__parameters[EXC_STRENGTH];
+            else if(__parameters[EXC_STRENGTH] is double)
+                strength = (double)__parameters[EXC_STRENGTH];
+            else
+                throw new NotSupportedException("Invalid strength");
+
+            double[] allChannels = new double[this.Bound.Count];
+            foreach (int channel in channels)
+                allChannels[channel] = strength;
+            this.Bound.ApplyInputs(allChannels);
+        }
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/Stimulus.cs
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/Stimulus.cs	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/Stimulus.cs	(revision 171)
@@ -0,0 +1,113 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BCMToolbox
+{
+    [Serializable]
+    public abstract class StimulatorBase
+    {
+        protected Dictionary<string, object> __parameters = new Dictionary<string, object>();
+        
+        [NonSerialized]
+        INetwork __bound = null;
+        int __startTick = 0;
+        public const string STIMULUS_LENGTH = "Stimulus Length";
+        public const string STIMULUS_START = "Stimulus Start";
+        public const string STIMULUS_NULL = "null";
+        
+        public abstract string[] GetParameters();
+        protected abstract void Apply();
+        protected INetwork Bound
+        {
+            get
+            {
+                return __bound;
+            }
+        }
+
+        protected int ElapsedTicks
+        {
+            get
+            {
+                return __bound.Ticks - __startTick;
+            }
+        }
+
+        public static double GetDouble(object o)
+        {
+            if (o is int)
+                return (double)(int)o;
+            else if (o is double)
+                return (double)o;
+            return double.NaN;
+        }
+
+        public virtual void SetParameters(Dictionary<string, object> toSet)
+        {
+            List<string> paramNames = new List<string>(GetParameters());
+            foreach (KeyValuePair<string, object> kvp in toSet)
+                if (paramNames.Contains(kvp.Key))
+                    __parameters[kvp.Key] = kvp.Value;
+        }
+
+        public bool IsBound
+        {
+            get
+            {
+                return __bound != null;
+            }
+        }
+
+        public void BindToNetwork(INetwork net)
+        {
+            if (__bound != null)
+                throw new ArgumentException("Stimulus already bound to a network.");
+
+            List<string> paramNames = new List<string>(GetParameters());
+            foreach (string paramName in paramNames)
+                if (!__parameters.ContainsKey(paramName))
+                    throw new ArgumentException("Parameter not set: " + paramName);
+
+            __bound = net;
+            __bound.TickProgress += new EventHandler(__bound_TickProgress);
+            __bound_TickProgress(this, EventArgs.Empty);
+        }
+
+        public void Unbind()
+        {
+            if (__bound == null)
+                throw new NotSupportedException("This stimulus was not bound.");
+            __bound.TickProgress -= new EventHandler(__bound_TickProgress);
+            __bound = null;
+            __startTick = 0;
+        }
+
+        protected virtual void __bound_TickProgress(object sender, EventArgs e)
+        {
+            if (!IsBound)
+                return;
+            if (__parameters.ContainsKey(STIMULUS_START))
+            {
+                if (__parameters[STIMULUS_START] != null)
+                {
+                    object start = __parameters[STIMULUS_START].ToString();
+                    if (start is int)
+                        if (__bound.Ticks < (int)start) // not started yet
+                            return;
+                }
+            }
+
+            if (__startTick == 0)
+                __startTick = __bound.Ticks;
+
+            Apply();
+            if (__parameters.ContainsKey(STIMULUS_LENGTH))
+                if(__parameters[STIMULUS_LENGTH] != null)
+                    if(__parameters[STIMULUS_LENGTH] is int)
+                        if (ElapsedTicks >= (int)__parameters[STIMULUS_LENGTH])
+                            Unbind();
+        }
+    }
+}
Index: /proiecte/ParallelANN/BCMToolbox/obj/Debug/BCMToolbox.csproj.FileListAbsolute.txt
===================================================================
--- /proiecte/ParallelANN/BCMToolbox/obj/Debug/BCMToolbox.csproj.FileListAbsolute.txt	(revision 171)
+++ /proiecte/ParallelANN/BCMToolbox/obj/Debug/BCMToolbox.csproj.FileListAbsolute.txt	(revision 171)
@@ -0,0 +1,15 @@
+C:\Facultate\diploma\BCMToolbox\bin\Debug\BCMToolbox.dll
+C:\Facultate\diploma\BCMToolbox\bin\Debug\BCMToolbox.pdb
+C:\Facultate\diploma\BCMToolbox\obj\Debug\ResolveAssemblyReference.cache
+C:\Facultate\diploma\BCMToolbox\obj\Debug\BCMToolbox.dll
+C:\Facultate\diploma\BCMToolbox\obj\Debug\BCMToolbox.pdb
+F:\facultate\diploma\BCMToolbox\bin\Debug\BCMToolbox.dll
+F:\facultate\diploma\BCMToolbox\bin\Debug\BCMToolbox.pdb
+F:\facultate\diploma\BCMToolbox\obj\Debug\ResolveAssemblyReference.cache
+F:\facultate\diploma\BCMToolbox\obj\Debug\BCMToolbox.dll
+F:\facultate\diploma\BCMToolbox\obj\Debug\BCMToolbox.pdb
+D:\work\temp\bcm\BCMToolbox\bin\Debug\BCMToolbox.dll
+D:\work\temp\bcm\BCMToolbox\bin\Debug\BCMToolbox.pdb
+D:\work\temp\bcm\BCMToolbox\obj\Debug\ResolveAssemblyReference.cache
+D:\work\temp\bcm\BCMToolbox\obj\Debug\BCMToolbox.dll
+D:\work\temp\bcm\BCMToolbox\obj\Debug\BCMToolbox.pdb
Index: /proiecte/ParallelANN/VisualBCM/GraphForm.Designer.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/GraphForm.Designer.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/GraphForm.Designer.cs	(revision 171)
@@ -0,0 +1,78 @@
+﻿namespace VisualBCM
+{
+    partial class GraphForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            this.label1 = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(483, 300);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+            this.pictureBox1.TabIndex = 0;
+            this.pictureBox1.TabStop = false;
+            // 
+            // label1
+            // 
+            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.label1.ForeColor = System.Drawing.Color.White;
+            this.label1.Location = new System.Drawing.Point(12, 277);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(0, 14);
+            this.label1.TabIndex = 1;
+            // 
+            // GraphForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.Black;
+            this.ClientSize = new System.Drawing.Size(483, 300);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.pictureBox1);
+            this.Name = "GraphForm";
+            this.Text = "VisualBCM Graphing";
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.Label label1;
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/GraphForm.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/GraphForm.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/GraphForm.cs	(revision 171)
@@ -0,0 +1,155 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Diagnostics;
+
+using BCMToolbox;
+
+namespace VisualBCM
+{
+    public partial class GraphForm : Form, INetworkMonitor
+    {
+        
+        Func<INetwork, double[]> __norm = null;
+        Color[] __wheel = null;
+
+        const int GRAPH_DEPTH = 50;
+
+        List<double[]> __gatheredNorms = new List<double[]>(GRAPH_DEPTH + 10);
+        double[] __gatheredTotals = null;
+        int __normWidth = 0;
+        int __normTotalCount = 0;
+
+
+        
+
+        public GraphForm(TraceableNetwork net, Func<INetwork,double[]> norms, string description)
+        {
+            __wheel = GUIUtilities.GetColorWheel();
+            InitializeComponent();
+
+         
+            __norm = norms;
+
+            if(net != null)
+                net.RegisterMonitor(this);
+            
+
+            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+
+            this.TopMost = true;
+
+            if (net != null)
+                this.Text = String.Format("VisualBCM Graphing tool [{0} - {1}]", net.Identification, description);
+            else
+                this.Text = String.Format("VisualBCM Graphing tool [{0}]", description);
+        }
+
+        public void RefreshGraph()
+        {
+            if (__gatheredNorms.Count == 0)
+                return;
+
+            Bitmap bmp = new Bitmap(GRAPH_DEPTH, 100, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
+
+            lock (__gatheredNorms)
+            {
+                int start = 0;
+                if (__gatheredNorms.Count > GRAPH_DEPTH)
+                    start = __gatheredNorms.Count - GRAPH_DEPTH;
+
+                for (int j = 0; j < __normWidth; j++)
+                {
+                    double normAve = __gatheredTotals[j] / __normTotalCount;
+                    for (int i = start; i < __gatheredNorms.Count; i++)
+                    {
+                        double val = __gatheredNorms[i][j];
+                        val /= normAve;
+                        val = val * 50;
+                        val = 100 - val;
+
+                        if (val < 0)
+                            val = 0;
+                        if (val >= 100)
+                            val = 99;
+
+                        bmp.SetPixel(i - start, (int)val,
+                            __wheel[j % __wheel.Length]);
+                    }
+                }
+            }
+
+            this.pictureBox1.Image = bmp;
+            this.label1.Text = String.Format("ticks: {0}", __normTotalCount);            
+        }
+
+        
+
+        #region INetworkMonitor Members
+
+        public Func<INetwork, double[]> KernelFunction
+        {
+            get
+            {
+                return __norm;
+            }
+        }
+
+        public void RegisterNorm(double[] newNorm)
+        {
+            lock (__gatheredNorms)
+            {
+                if (__gatheredNorms.Count == 0)
+                {
+                    __normWidth = newNorm.Length;
+                    __gatheredTotals = new double[__normWidth];
+                }
+                else if (newNorm.Length != __normWidth)
+                    return;
+
+                __gatheredNorms.Add(newNorm);
+                while (__gatheredNorms.Count > GRAPH_DEPTH)
+                    __gatheredNorms.RemoveAt(0);
+
+                for (int i = 0; i < __normWidth; i++)
+                    __gatheredTotals[i] += newNorm[i];
+
+                __normTotalCount++;
+            }
+        }
+
+        #endregion
+
+        #region Plotting function graphs
+        public static GraphForm PlotFunction(Func<double, double> func, double intervalMin, double intervalMax)
+        {
+            GraphForm toRet = new GraphForm(null, null, "Function Graph");
+            double maxPlot = double.MinValue;
+            double minPlot = double.MaxValue;
+            for (int i = 0; i < GRAPH_DEPTH; i++)
+            {
+                double val = i * (intervalMax - intervalMin) / GRAPH_DEPTH + intervalMin;
+                double y = func(val);
+                if (y < minPlot)
+                    minPlot = y;
+                if (y > maxPlot)
+                    maxPlot = y;
+                toRet.RegisterNorm(new double[] { y });
+            }
+            toRet.RefreshGraph();
+            toRet.label1.Text = String.Format("domain: [{0}, {1}] | codomain: [{2}, {3}]",
+                intervalMin.ToString("#0.00"), intervalMax.ToString("#0.00"),
+                minPlot.ToString("#0.00"), maxPlot.ToString("#0.00"));
+
+            toRet.Show();
+            toRet.BringToFront();
+            return toRet;
+        }
+        #endregion
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/GraphForm.resx
===================================================================
--- /proiecte/ParallelANN/VisualBCM/GraphForm.resx	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/GraphForm.resx	(revision 171)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: /proiecte/ParallelANN/VisualBCM/MainForm.Designer.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/MainForm.Designer.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/MainForm.Designer.cs	(revision 171)
@@ -0,0 +1,217 @@
+﻿namespace VisualBCM
+{
+    partial class MainForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+            this.propagateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.indefinitelyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
+            this.testToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.graphsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.simpleStatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.midNeuronToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.stmuliToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.constantToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.consistentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.weightsVisualiser1 = new VisualBCM.NetVisualiser();
+            this.ticksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.menuStrip1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // menuStrip1
+            // 
+            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.propagateToolStripMenuItem,
+            this.testToolStripMenuItem,
+            this.graphsToolStripMenuItem,
+            this.stmuliToolStripMenuItem});
+            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
+            this.menuStrip1.Name = "menuStrip1";
+            this.menuStrip1.Size = new System.Drawing.Size(746, 24);
+            this.menuStrip1.TabIndex = 1;
+            this.menuStrip1.Text = "menuStrip1";
+            // 
+            // propagateToolStripMenuItem
+            // 
+            this.propagateToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.indefinitelyToolStripMenuItem,
+            this.toolStripMenuItem2,
+            this.ticksToolStripMenuItem});
+            this.propagateToolStripMenuItem.Name = "propagateToolStripMenuItem";
+            this.propagateToolStripMenuItem.Size = new System.Drawing.Size(69, 20);
+            this.propagateToolStripMenuItem.Text = "Propagate";
+            // 
+            // indefinitelyToolStripMenuItem
+            // 
+            this.indefinitelyToolStripMenuItem.Name = "indefinitelyToolStripMenuItem";
+            this.indefinitelyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+            this.indefinitelyToolStripMenuItem.Text = "Indefinitely...";
+            this.indefinitelyToolStripMenuItem.Click += new System.EventHandler(this.indefinitelyToolStripMenuItem_Click);
+            // 
+            // toolStripMenuItem2
+            // 
+            this.toolStripMenuItem2.Name = "toolStripMenuItem2";
+            this.toolStripMenuItem2.Size = new System.Drawing.Size(152, 22);
+            this.toolStripMenuItem2.Text = "25 Ticks";
+            this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
+            // 
+            // testToolStripMenuItem
+            // 
+            this.testToolStripMenuItem.Name = "testToolStripMenuItem";
+            this.testToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
+            this.testToolStripMenuItem.Text = "Test";
+            this.testToolStripMenuItem.Click += new System.EventHandler(this.testToolStripMenuItem_Click);
+            // 
+            // graphsToolStripMenuItem
+            // 
+            this.graphsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.simpleStatsToolStripMenuItem,
+            this.midNeuronToolStripMenuItem});
+            this.graphsToolStripMenuItem.Name = "graphsToolStripMenuItem";
+            this.graphsToolStripMenuItem.Size = new System.Drawing.Size(53, 20);
+            this.graphsToolStripMenuItem.Text = "Graphs";
+            // 
+            // simpleStatsToolStripMenuItem
+            // 
+            this.simpleStatsToolStripMenuItem.Name = "simpleStatsToolStripMenuItem";
+            this.simpleStatsToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
+            this.simpleStatsToolStripMenuItem.Text = "Simple Stats...";
+            this.simpleStatsToolStripMenuItem.Click += new System.EventHandler(this.simpleStatsToolStripMenuItem_Click);
+            // 
+            // midNeuronToolStripMenuItem
+            // 
+            this.midNeuronToolStripMenuItem.Name = "midNeuronToolStripMenuItem";
+            this.midNeuronToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
+            this.midNeuronToolStripMenuItem.Text = "MidNeuron...";
+            this.midNeuronToolStripMenuItem.Click += new System.EventHandler(this.midNeuronToolStripMenuItem_Click);
+            // 
+            // stmuliToolStripMenuItem
+            // 
+            this.stmuliToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.constantToolStripMenuItem,
+            this.consistentToolStripMenuItem});
+            this.stmuliToolStripMenuItem.Name = "stmuliToolStripMenuItem";
+            this.stmuliToolStripMenuItem.Size = new System.Drawing.Size(47, 20);
+            this.stmuliToolStripMenuItem.Text = "Stmuli";
+            // 
+            // constantToolStripMenuItem
+            // 
+            this.constantToolStripMenuItem.Name = "constantToolStripMenuItem";
+            this.constantToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
+            this.constantToolStripMenuItem.Text = "Constant...";
+            this.constantToolStripMenuItem.Click += new System.EventHandler(this.constantToolStripMenuItem_Click);
+            // 
+            // consistentToolStripMenuItem
+            // 
+            this.consistentToolStripMenuItem.Name = "consistentToolStripMenuItem";
+            this.consistentToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
+            this.consistentToolStripMenuItem.Text = "Consistent...";
+            this.consistentToolStripMenuItem.Click += new System.EventHandler(this.consistentToolStripMenuItem_Click);
+            // 
+            // label1
+            // 
+            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(12, 586);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(35, 13);
+            this.label1.TabIndex = 2;
+            this.label1.Text = "label1";
+            // 
+            // label2
+            // 
+            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(12, 604);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(0, 13);
+            this.label2.TabIndex = 3;
+            // 
+            // weightsVisualiser1
+            // 
+            this.weightsVisualiser1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.weightsVisualiser1.AutoRefresh = false;
+            this.weightsVisualiser1.BoundNetwork = null;
+            this.weightsVisualiser1.Location = new System.Drawing.Point(12, 29);
+            this.weightsVisualiser1.Name = "weightsVisualiser1";
+            this.weightsVisualiser1.Size = new System.Drawing.Size(722, 554);
+            this.weightsVisualiser1.TabIndex = 0;
+            // 
+            // ticksToolStripMenuItem
+            // 
+            this.ticksToolStripMenuItem.Name = "ticksToolStripMenuItem";
+            this.ticksToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+            this.ticksToolStripMenuItem.Text = "250 Ticks";
+            this.ticksToolStripMenuItem.Click += new System.EventHandler(this.ticksToolStripMenuItem_Click);
+            // 
+            // MainForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(746, 621);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.weightsVisualiser1);
+            this.Controls.Add(this.menuStrip1);
+            this.MainMenuStrip = this.menuStrip1;
+            this.Name = "MainForm";
+            this.Text = "VisualBCM";
+            this.Load += new System.EventHandler(this.MainForm_Load);
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
+            this.menuStrip1.ResumeLayout(false);
+            this.menuStrip1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private NetVisualiser weightsVisualiser1;
+        private System.Windows.Forms.MenuStrip menuStrip1;
+        private System.Windows.Forms.ToolStripMenuItem propagateToolStripMenuItem;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.ToolStripMenuItem testToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem graphsToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem simpleStatsToolStripMenuItem;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.ToolStripMenuItem stmuliToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem constantToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem consistentToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem midNeuronToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem indefinitelyToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
+        private System.Windows.Forms.ToolStripMenuItem ticksToolStripMenuItem;
+    }
+}
+
Index: /proiecte/ParallelANN/VisualBCM/MainForm.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/MainForm.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/MainForm.cs	(revision 171)
@@ -0,0 +1,237 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Diagnostics;
+using System.Threading;
+
+using BCMToolbox;
+
+
+namespace VisualBCM
+{
+    public partial class MainForm : Form
+    {
+        TraceableNetwork net = null;
+        TimeSpan __lastElapsed = TimeSpan.Zero;
+        List<GraphForm> __graphs = new List<GraphForm>();
+
+        public MainForm()
+        {
+            InitializeComponent();
+
+            this.weightsVisualiser1.AutoRefresh = false;
+            this.weightsVisualiser1.SetManualScale(0, 1.00);
+            ///this.weightsVisualiser1.SetAutoScale();
+
+            /*
+            for (int i = 0; i < 20; i++)
+                System.Diagnostics.Debug.WriteLine(BCMToolbox.MathToolbox.GetRandomGaussian()); */
+
+            /*
+            double tot = 0;
+            for (int i = 0; i < 20; i++)
+            {
+                double e = Math.Exp(-i / 10.0);
+                tot += e;
+                System.Diagnostics.Debug.Write(String.Format("{0}, ", e));
+            }
+            System.Diagnostics.Debug.WriteLine("");
+            System.Diagnostics.Debug.WriteLine(tot); */
+        }
+
+        private void MainForm_Load(object sender, EventArgs e)
+        {
+            Random r = new Random();
+
+          //net = BCMFactory.BuildSyncSigmoidActivationNetwork(100);
+           
+            //net = BCMFactory.BuildSyncSigmoidActivationNetworkSparse(100, (i, j) => 5.0/Math.Pow(Math.Abs(i - j),2) >= r.NextDouble());
+            //net = BCMFactory.BuildOja(100);
+            net = BCMFactory.BuildModel01(100);
+
+            BCMFactory.Reduce(net, (i, j) => 5.0 / Math.Pow(Math.Abs(i - j), 2) >= r.NextDouble());
+
+            net.Initialize(0.05,0.3);
+            /*double[] de = new double[100];
+            for (int i = 0; i < 10; i++)
+                de[i] = 1;
+            net.ApplyInputs(de);*/
+
+            this.weightsVisualiser1.BoundNetwork = net;
+            
+            RefreshVisualizer();
+
+            //GraphForm.PlotFunction(x => { double e1 = Math.Exp(-x); return e1 / ((1.0 + e1) * (1.0 + e1)); }, -5, 5);
+            //GraphForm.PlotFunction(x => (1 / (1 + Math.Exp(-x))), -5, 5);
+        }
+
+        
+        void propagateBcknd()
+        {
+            Stopwatch st1 = new Stopwatch();
+            while (true)
+            {
+                st1.Reset();
+                st1.Start();
+                net.Propagate();
+                st1.Stop();
+                __lastElapsed = st1.Elapsed;
+            }
+        }
+
+
+        public void RefreshVisualizer()
+        {
+            weightsVisualiser1.RefreshNetwork();
+            if (weightsVisualiser1.LastNetworkState != null)
+            {
+                BCMToolbox.Statistics.BasicStats stats = new BCMToolbox.Statistics.BasicStats(weightsVisualiser1.LastNetworkState);
+                this.label1.Text = stats.ToString();
+            }
+        }
+
+        private void testToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            if (net != null)
+            {
+                BCMToolbox.Statistics.StaticBoundessTest sbt = new BCMToolbox.Statistics.StaticBoundessTest(net);
+                this.label1.Text = sbt.ToString();
+
+                net.Initialize(1.0, 1.0);
+            }
+        }
+
+        private void simpleStatsToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            GraphForm g1 = new GraphForm(
+                net,
+                n1 => {
+                    BCMToolbox.Statistics.BasicStats bs = new BCMToolbox.Statistics.BasicStats(n1);
+                    return new double[] { bs.AveragePotential, bs.AverageWeight };
+                },
+                "ave out | ave wt");
+            __graphs.Add(g1);
+            g1.Show();
+        }
+
+        private void midNeuronToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            GraphForm g1 = new GraphForm(
+                net,
+                n1 =>
+                {
+                    int idx = net.Count / 2;
+                    double ave = 0.0;
+                    double ave2 = 0.0;
+                    for (int i = 0; i < net.Count; i++)
+                    {
+                        ave += net[i, idx];
+                        ave2 += net[idx, i];
+                    }
+                    ave /= net.Count;
+                    ave2 /= net.Count;
+                    return new double[] { net[idx], ave, ave2 };
+                },
+                    "mid out | mid ave wt in | mid ave wt out");
+            __graphs.Add(g1);
+            g1.Show();
+        }
+
+        private void constantToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            if (net == null)
+                return;
+            BCMToolbox.Stimuli.SimpleExcitator se = new BCMToolbox.Stimuli.SimpleExcitator();
+            StimulusForm sf = new StimulusForm(se);
+            sf.ApplyStimulus += new EventHandler(sf_ApplyStimulus);
+            sf.Show();
+            sf.BringToFront();
+        }
+
+        private void consistentToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            if (net == null)
+                return;
+            BCMToolbox.Stimuli.ConsistentExcitator ce = new BCMToolbox.Stimuli.ConsistentExcitator();
+            StimulusForm sf = new StimulusForm(ce);
+            sf.ApplyStimulus += new EventHandler(sf_ApplyStimulus);
+            sf.Show();
+            sf.BringToFront();
+        }
+
+        void sf_ApplyStimulus(object sender, EventArgs e)
+        {
+            StimulusForm sf = sender as StimulusForm;
+            sf.Stimulator.BindToNetwork(net);
+        }
+
+        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            System.Diagnostics.Process.GetCurrentProcess().Kill();
+        }
+
+        void RefreshAll()
+        {
+            RefreshVisualizer();
+            this.label2.Text = String.Format("tick: {1} | inst tps: {0}", (1.0 / __lastElapsed.TotalSeconds).ToString("#0.00"), net.Ticks);
+            foreach (GraphForm gf in __graphs)
+                gf.RefreshGraph();
+        }
+
+        private void indefinitelyToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            propagateToolStripMenuItem.Enabled = false;
+            testToolStripMenuItem.Enabled = false;
+
+            Thread th1 = new Thread(new ThreadStart(this.propagateBcknd));
+            th1.IsBackground = true;
+            th1.Start();
+            th1.Priority = ThreadPriority.Highest;
+
+            while (true)
+            {
+                RefreshAll();                
+                Application.DoEvents();
+            }
+        }
+
+        private void toolStripMenuItem2_Click(object sender, EventArgs e)
+        {
+            Stopwatch st1 = new Stopwatch();
+            for (int i = 0; i < 25; i++)
+            {
+                st1.Reset();
+                st1.Start();
+                net.Propagate();
+                st1.Stop();
+                __lastElapsed = st1.Elapsed;
+            }
+            RefreshAll();
+        }
+
+        private void ticksToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            Stopwatch st1 = new Stopwatch();
+            for (int i = 0; i < 250; i++)
+            {
+                st1.Reset();
+                st1.Start();
+                net.Propagate();
+                st1.Stop();
+                __lastElapsed = st1.Elapsed;
+            }
+            RefreshAll();
+        }
+
+
+
+
+
+
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/MainForm.resx
===================================================================
--- /proiecte/ParallelANN/VisualBCM/MainForm.resx	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/MainForm.resx	(revision 171)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
Index: /proiecte/ParallelANN/VisualBCM/NetVisualiser.Designer.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/NetVisualiser.Designer.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/NetVisualiser.Designer.cs	(revision 171)
@@ -0,0 +1,45 @@
+﻿namespace VisualBCM
+{
+    partial class NetVisualiser
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.SuspendLayout();
+            // 
+            // WeightsVisualiser
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Name = "WeightsVisualiser";
+            this.Size = new System.Drawing.Size(331, 254);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/NetVisualiser.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/NetVisualiser.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/NetVisualiser.cs	(revision 171)
@@ -0,0 +1,291 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+using BCMToolbox;
+
+namespace VisualBCM
+{
+    public partial class NetVisualiser : UserControl
+    {
+        const int MARKER_LENGTH = 5;
+        const double LEGEND_FACTOR = 0.2;
+
+        BCMToolbox.NetworkState __lastNetworkState = null;
+
+        BCMToolbox.TraceableNetwork __network = null;
+        Brush __background = null;
+        bool __autoRefresh = false;
+        Bitmap __backgroundBitmap = null;
+        Bitmap __outputBitmap1 = null;
+        Bitmap __outputBitmap2 = null;
+        Color[] __wtPalette = new Color[] { Color.DarkBlue, Color.Blue, Color.Magenta, Color.Red, Color.White, Color.Pink};
+        Color[] __outPalette = new Color[] { Color.Black, Color.DarkGreen, Color.Green, Color.GreenYellow, Color.Yellow};
+
+        //Color[] __palette = new Color[] { Color.Black, Color.White };
+
+
+        double __scaleMin = 0.0;
+        double __scaleMax = 0.0;
+        bool __autoScale = true;
+
+        public NetVisualiser()
+        {
+            InitializeComponent();
+
+            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+
+
+            __background = new SolidBrush(Color.Black);
+        }
+
+        #region Binding to Networks
+        public TraceableNetwork BoundNetwork
+        {
+            get
+            {
+                return __network;
+            }
+            set
+            {
+                if (__network != null)
+                    Unbind();
+                if(value != null)
+                    BindToNetwork(value);
+                __network_WeightsChanged(this, EventArgs.Empty);
+            }
+        }
+
+        void Unbind()
+        {
+            __network.WeightsChanged -= new EventHandler(__network_WeightsChanged);
+            __network = null;
+        }
+
+        void BindToNetwork(BCMToolbox.TraceableNetwork network)
+        {
+            __network = network;
+            __network.WeightsChanged += new EventHandler(__network_WeightsChanged);
+            __backgroundBitmap = new Bitmap(__network.Count, __network.Count, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
+            __outputBitmap1 = new Bitmap(__network.Count, MARKER_LENGTH, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
+            __outputBitmap2 = new Bitmap(MARKER_LENGTH, __network.Count, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
+        }
+
+        public bool AutoRefresh
+        {
+            get
+            {
+                return __autoRefresh;
+            }
+            set
+            {
+                __autoRefresh = value;
+            }
+        }
+
+        void __network_WeightsChanged(object sender, EventArgs e)
+        {
+            if (!__autoRefresh)
+                return;
+
+            if (this.InvokeRequired)
+                this.BeginInvoke(
+                    new Action(this.Invalidate));
+            else
+                this.Invalidate();
+        }
+
+        public void RefreshNetwork()
+        {
+            this.Invalidate();
+        }
+
+        #endregion
+
+        #region Painting
+
+        public void SetAutoScale()
+        {
+            __autoScale = true;
+            Invalidate();
+        }
+
+        public void SetManualScale(double minValue, double MaxValue)
+        {
+            __autoScale = false;
+            __scaleMin = minValue;
+            __scaleMax = MaxValue;
+            Invalidate();
+        }
+
+        public BCMToolbox.NetworkState LastNetworkState
+        {
+            get
+            {
+                return __lastNetworkState;
+            }
+        }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+
+            // System.Diagnostics.Debug.WriteLine("Painting...");
+            if (__network == null)
+            {
+                e.Graphics.FillRectangle(
+                    __background, 0, 0, Width, Height);
+                return;
+            }
+
+            BCMToolbox.NetworkState capturedState = __network.BuildNetworkState();
+            __lastNetworkState = capturedState;
+
+            // draw output graphs
+            {
+                double min = double.MaxValue;
+                double max = 0.0;
+                if (__autoScale)
+                {
+                    for (int i = 0; i < capturedState.Count; i++)
+                        {
+                            if (capturedState[i] < min)
+                                min = capturedState[i];
+
+                            if (capturedState[i] > max)
+                                max = capturedState[i];
+                        }
+                }
+                else
+                {
+                    min = __scaleMin;
+                    max = __scaleMax;
+                }
+
+
+
+                for (int i = 0; i < capturedState.Count; i++)
+                {
+                    double val = (capturedState[i] - min) / (max - min);
+                    if (val < 0)
+                        val = 0;
+                    if (val > 1.0)
+                        val = 1.0;
+
+                    Color c = GUIUtilities.GetPaletteColor(val, __outPalette);
+
+                    for (int j = 0; j < MARKER_LENGTH; j++)
+                    {
+                        __outputBitmap1.SetPixel(i, j, c);
+                        __outputBitmap2.SetPixel(j, i, c);
+                    }
+                }
+                
+            }
+
+            // draw weight graphs
+            {
+                double min = double.MaxValue;
+                double max = 0.0;
+                if (__autoScale)
+                {
+                    for (int i = 0; i < capturedState.Count; i++)
+                        for (int j = 0; j < capturedState.Count; j++)
+                        {
+                            if (capturedState[i, j] < min)
+                                min = capturedState[i, j];
+
+                            if (capturedState[i, j] > max)
+                                max = capturedState[i, j];
+                        }
+                }
+                else
+                {
+                    min = __scaleMin;
+                    max = __scaleMax;
+                }
+
+
+
+                for (int i = 0; i < capturedState.Count; i++)
+                    for (int j = 0; j < capturedState.Count; j++)
+                    {
+                        double val = (capturedState[i, j] - min) / (max - min);
+                        if (val < 0)
+                            val = 0;
+                        if (val > 1.0)
+                            val = 1.0;
+
+                        __backgroundBitmap.SetPixel(i, j,
+                            GUIUtilities.GetPaletteColor(val, __wtPalette));
+                    }
+            }
+
+
+            // paint on the screen
+            e.Graphics.DrawImage(__backgroundBitmap, (int)(Width*LEGEND_FACTOR), (int)(Height * LEGEND_FACTOR), (int)(Width * (1-LEGEND_FACTOR)), (int)(Height * (1-LEGEND_FACTOR)));
+            e.Graphics.DrawImage(__outputBitmap1, (int)(Width*LEGEND_FACTOR), 0, (int)(Width * (1 - LEGEND_FACTOR)), (int)(Height * LEGEND_FACTOR));
+            e.Graphics.DrawImage(__outputBitmap2, 0, (int)(Height * LEGEND_FACTOR), (int)(Width * LEGEND_FACTOR), (int)(Height * (1 - LEGEND_FACTOR)));
+
+        }
+        #endregion
+
+    }
+
+
+    public class GUIUtilities
+    {
+        // returns the color corresponding to a value between 0 and 1 vs. a specified palette
+        public static Color GetPaletteColor(double val, Color[] Palette)
+        {
+            if (double.IsNaN(val))
+                return Color.Black;
+
+            int len = Palette.Length - 1;
+            Color PaletteLow = Palette[(int)Math.Floor(val * len)];
+            Color PaletteHigh = Palette[(int)Math.Ceiling(val * len)];
+            if (PaletteLow == PaletteHigh)
+                return PaletteHigh;
+            val -= Math.Floor(val * Palette.Length) * (1.0 / Palette.Length);
+            return Color.FromArgb(
+                (int)(PaletteLow.R + val * (PaletteHigh.R - PaletteLow.R)),
+                (int)(PaletteLow.G + val * (PaletteHigh.G - PaletteLow.G)),
+                (int)(PaletteLow.B + val * (PaletteHigh.B - PaletteLow.B)));
+        }
+
+        public static Color[] GetColorWheel()
+        {
+            Color[] toRet = new Color[23];
+
+            toRet[0] = Color.FromArgb(204, 0, 0);
+            toRet[1] = Color.FromArgb(102, 0, 0);
+            toRet[2] = Color.FromArgb(204, 0, 204);
+            toRet[3] = Color.FromArgb(153, 0, 153);
+            toRet[4] = Color.FromArgb(102, 0, 204);
+            toRet[5] = Color.FromArgb(51, 0, 102);
+            toRet[6] = Color.FromArgb(51, 0, 153);
+            toRet[7] = Color.FromArgb(0, 51, 153);
+            toRet[8] = Color.FromArgb(0, 0, 51);
+            toRet[9] = Color.FromArgb(102, 204, 205);
+            toRet[10] = Color.FromArgb(0, 255, 153);
+            toRet[11] = Color.FromArgb(0, 153, 51);
+            toRet[12] = Color.FromArgb(0, 102, 51);
+            toRet[13] = Color.FromArgb(0, 153, 0);
+            toRet[14] = Color.FromArgb(102, 204, 0);
+            toRet[15] = Color.FromArgb(204, 204, 0);
+            toRet[16] = Color.FromArgb(153, 153, 0);
+            toRet[17] = Color.FromArgb(255, 153, 0);
+            toRet[18] = Color.FromArgb(204, 102, 0);
+            toRet[19] = Color.FromArgb(255, 102, 0);
+            toRet[20] = Color.FromArgb(204, 51, 0);
+            toRet[21] = Color.FromArgb(153, 0, 0);
+            toRet[22] = Color.FromArgb(102, 0, 0);
+            return toRet;
+        }
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/NetVisualiser.resx
===================================================================
--- /proiecte/ParallelANN/VisualBCM/NetVisualiser.resx	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/NetVisualiser.resx	(revision 171)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: /proiecte/ParallelANN/VisualBCM/Program.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/Program.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/Program.cs	(revision 171)
@@ -0,0 +1,31 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+using System.Diagnostics;
+
+
+namespace VisualBCM
+{
+    static class Program
+    {
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            /*
+            for (int tau = 2; tau < 10; tau++)
+            {
+                Debug.WriteLine("");
+                for (int t = 0; t < 10; t++)
+                    Debug.Write(Math.Exp(-(10.0 - t) / tau).ToString() + " ");
+            } */
+
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new MainForm());
+        }
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/Properties/AssemblyInfo.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/Properties/AssemblyInfo.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/Properties/AssemblyInfo.cs	(revision 171)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("VisualBCM")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("VisualBCM")]
+[assembly: AssemblyCopyright("Copyright ©  2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c7ebed99-d751-477b-a0d7-31805a684968")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /proiecte/ParallelANN/VisualBCM/Properties/Resources.Designer.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/Properties/Resources.Designer.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/Properties/Resources.Designer.cs	(revision 171)
@@ -0,0 +1,71 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.4927
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace VisualBCM.Properties
+{
+
+
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VisualBCM.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/Properties/Resources.resx
===================================================================
--- /proiecte/ParallelANN/VisualBCM/Properties/Resources.resx	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/Properties/Resources.resx	(revision 171)
@@ -0,0 +1,117 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: /proiecte/ParallelANN/VisualBCM/Properties/Settings.Designer.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/Properties/Settings.Designer.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/Properties/Settings.Designer.cs	(revision 171)
@@ -0,0 +1,30 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.4927
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace VisualBCM.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/Properties/Settings.settings
===================================================================
--- /proiecte/ParallelANN/VisualBCM/Properties/Settings.settings	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/Properties/Settings.settings	(revision 171)
@@ -0,0 +1,7 @@
+﻿<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>
Index: /proiecte/ParallelANN/VisualBCM/Properties/licenses.licx
===================================================================
--- /proiecte/ParallelANN/VisualBCM/Properties/licenses.licx	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/Properties/licenses.licx	(revision 171)
@@ -0,0 +1,1 @@
+
Index: /proiecte/ParallelANN/VisualBCM/StimulusForm.Designer.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/StimulusForm.Designer.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/StimulusForm.Designer.cs	(revision 171)
@@ -0,0 +1,138 @@
+﻿namespace VisualBCM
+{
+    partial class StimulusForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.button1 = new System.Windows.Forms.Button();
+            this.button2 = new System.Windows.Forms.Button();
+            this.richTextBox1 = new System.Windows.Forms.RichTextBox();
+            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+            this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
+            this.menuStrip1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // button1
+            // 
+            this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.button1.Location = new System.Drawing.Point(272, 272);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(75, 23);
+            this.button1.TabIndex = 0;
+            this.button1.Text = "OK";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // button2
+            // 
+            this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.button2.Location = new System.Drawing.Point(353, 272);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(75, 23);
+            this.button2.TabIndex = 1;
+            this.button2.Text = "Cancel";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
+            // richTextBox1
+            // 
+            this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.richTextBox1.Location = new System.Drawing.Point(12, 42);
+            this.richTextBox1.Name = "richTextBox1";
+            this.richTextBox1.Size = new System.Drawing.Size(429, 224);
+            this.richTextBox1.TabIndex = 2;
+            this.richTextBox1.Text = "";
+            // 
+            // menuStrip1
+            // 
+            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.saveToolStripMenuItem,
+            this.loadToolStripMenuItem});
+            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
+            this.menuStrip1.Name = "menuStrip1";
+            this.menuStrip1.Size = new System.Drawing.Size(453, 24);
+            this.menuStrip1.TabIndex = 3;
+            this.menuStrip1.Text = "menuStrip1";
+            // 
+            // saveToolStripMenuItem
+            // 
+            this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
+            this.saveToolStripMenuItem.Size = new System.Drawing.Size(52, 20);
+            this.saveToolStripMenuItem.Text = "Save...";
+            this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
+            // 
+            // loadToolStripMenuItem
+            // 
+            this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
+            this.loadToolStripMenuItem.Size = new System.Drawing.Size(54, 20);
+            this.loadToolStripMenuItem.Text = "Load...";
+            this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click);
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.Filter = "Stimulus Params (*.stim)|*.stim";
+            // 
+            // saveFileDialog1
+            // 
+            this.saveFileDialog1.Filter = "Stimulus Params (*.stim)|*.stim";
+            // 
+            // StimulusForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(453, 307);
+            this.Controls.Add(this.richTextBox1);
+            this.Controls.Add(this.button2);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.menuStrip1);
+            this.MainMenuStrip = this.menuStrip1;
+            this.Name = "StimulusForm";
+            this.Text = "VisualBCM: Stimulus";
+            this.menuStrip1.ResumeLayout(false);
+            this.menuStrip1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.RichTextBox richTextBox1;
+        private System.Windows.Forms.MenuStrip menuStrip1;
+        private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem loadToolStripMenuItem;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.SaveFileDialog saveFileDialog1;
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/StimulusForm.cs
===================================================================
--- /proiecte/ParallelANN/VisualBCM/StimulusForm.cs	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/StimulusForm.cs	(revision 171)
@@ -0,0 +1,129 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+
+namespace VisualBCM
+{
+    public partial class StimulusForm : Form
+    {
+        BCMToolbox.StimulatorBase __stim = null;
+        public StimulusForm(BCMToolbox.StimulatorBase stim)
+        {
+            InitializeComponent();
+
+            __stim = stim;
+
+            // prepare stimulus screen
+            string[] props = __stim.GetParameters();
+            StringBuilder rtext = new StringBuilder();
+            foreach (string prop in props)
+            {
+                rtext.AppendFormat("{0} = {1}", prop, BCMToolbox.StimulatorBase.STIMULUS_NULL);
+                rtext.AppendLine("");
+            }
+            this.richTextBox1.Text = rtext.ToString();
+        }
+
+        public BCMToolbox.StimulatorBase Stimulator
+        {
+            get
+            {
+                return __stim;
+            }
+        }
+
+
+        public event EventHandler ApplyStimulus;
+
+        void SetParameters()
+        {
+            Dictionary<string, object> stimParameters = new Dictionary<string, object>();
+            foreach (string line in this.richTextBox1.Lines)
+            {
+                if (!line.Contains('='))
+                    continue;
+
+                string[] linetokens = line.Split('=');
+                string key = linetokens[0].Trim();
+                string value = linetokens[1].Trim();
+                object parsedValue = null;
+
+                if (value.Contains(';')) // this is an array of int
+                {
+                    string[] arrTokens = value.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
+                    List<int> pValue = new List<int>();
+                    foreach (string tok in arrTokens)
+                        pValue.Add(Int32.Parse(tok));
+                    parsedValue = pValue.ToArray();
+                }
+                else if (value.Contains('.')) // this is a double
+                    parsedValue = Double.Parse(value);
+                else
+                {
+                    try
+                    {
+                        parsedValue = Int32.Parse(value);
+                    }
+                    catch
+                    {
+                        if (value != "null")
+                            parsedValue = value;
+                    }
+                }
+
+                stimParameters.Add(key, parsedValue);
+            }
+
+            __stim.SetParameters(stimParameters);
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            SetParameters();
+            if (this.ApplyStimulus != null)
+                this.ApplyStimulus(this, EventArgs.Empty);
+            this.Close();
+        }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+
+        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            if (this.saveFileDialog1.ShowDialog() != DialogResult.OK)
+                return;
+
+
+            using (StreamWriter sw = new StreamWriter(this.saveFileDialog1.FileName, false, Encoding.UTF8))
+            {
+                foreach (string line in richTextBox1.Lines)
+                    sw.WriteLine(line);
+                sw.Close();
+            }
+
+            System.Media.SystemSounds.Beep.Play();
+        }
+
+        private void loadToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            if (this.openFileDialog1.ShowDialog() != DialogResult.OK)
+                return;
+
+            using (StreamReader sr = new StreamReader(this.openFileDialog1.FileName, Encoding.UTF8))
+            {
+                this.richTextBox1.Text = sr.ReadToEnd();
+                sr.Close();
+            }
+
+            System.Media.SystemSounds.Beep.Play();
+        }
+    }
+}
Index: /proiecte/ParallelANN/VisualBCM/StimulusForm.resx
===================================================================
--- /proiecte/ParallelANN/VisualBCM/StimulusForm.resx	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/StimulusForm.resx	(revision 171)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>157, 17</value>
+  </metadata>
+  <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>272, 17</value>
+  </metadata>
+</root>
Index: /proiecte/ParallelANN/VisualBCM/VisualBCM.csproj
===================================================================
--- /proiecte/ParallelANN/VisualBCM/VisualBCM.csproj	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/VisualBCM.csproj	(revision 171)
@@ -0,0 +1,124 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{02B4391D-1021-40F3-9EE6-45BCC0F2963D}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>VisualBCM</RootNamespace>
+    <AssemblyName>VisualBCM</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Design" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="GraphForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="GraphForm.Designer.cs">
+      <DependentUpon>GraphForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="MainForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="MainForm.Designer.cs">
+      <DependentUpon>MainForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="GraphForm.resx">
+      <DependentUpon>GraphForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="MainForm.resx">
+      <DependentUpon>MainForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\licenses.licx" />
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="NetVisualiser.resx">
+      <DependentUpon>NetVisualiser.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="StimulusForm.resx">
+      <DependentUpon>StimulusForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <Compile Include="NetVisualiser.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="NetVisualiser.Designer.cs">
+      <DependentUpon>NetVisualiser.cs</DependentUpon>
+    </Compile>
+    <Compile Include="StimulusForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="StimulusForm.Designer.cs">
+      <DependentUpon>StimulusForm.cs</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\BCMToolbox\BCMToolbox.csproj">
+      <Project>{76B24E9B-BFC1-42CA-BBB0-5A61F1535F26}</Project>
+      <Name>BCMToolbox</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /proiecte/ParallelANN/VisualBCM/VisualBCM.sln
===================================================================
--- /proiecte/ParallelANN/VisualBCM/VisualBCM.sln	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/VisualBCM.sln	(revision 171)
@@ -0,0 +1,26 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualBCM", "VisualBCM.csproj", "{02B4391D-1021-40F3-9EE6-45BCC0F2963D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BCMToolbox", "..\BCMToolbox\BCMToolbox.csproj", "{76B24E9B-BFC1-42CA-BBB0-5A61F1535F26}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{02B4391D-1021-40F3-9EE6-45BCC0F2963D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{02B4391D-1021-40F3-9EE6-45BCC0F2963D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{02B4391D-1021-40F3-9EE6-45BCC0F2963D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{02B4391D-1021-40F3-9EE6-45BCC0F2963D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{76B24E9B-BFC1-42CA-BBB0-5A61F1535F26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{76B24E9B-BFC1-42CA-BBB0-5A61F1535F26}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{76B24E9B-BFC1-42CA-BBB0-5A61F1535F26}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{76B24E9B-BFC1-42CA-BBB0-5A61F1535F26}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /proiecte/ParallelANN/VisualBCM/obj/Debug/VisualBCM.csproj.FileListAbsolute.txt
===================================================================
--- /proiecte/ParallelANN/VisualBCM/obj/Debug/VisualBCM.csproj.FileListAbsolute.txt	(revision 171)
+++ /proiecte/ParallelANN/VisualBCM/obj/Debug/VisualBCM.csproj.FileListAbsolute.txt	(revision 171)
@@ -0,0 +1,42 @@
+C:\Facultate\diploma\VisualBCM\bin\Debug\VisualBCM.exe
+C:\Facultate\diploma\VisualBCM\bin\Debug\VisualBCM.pdb
+C:\Facultate\diploma\VisualBCM\bin\Debug\BCMToolbox.dll
+C:\Facultate\diploma\VisualBCM\bin\Debug\BCMToolbox.pdb
+C:\Facultate\diploma\VisualBCM\obj\Debug\ResolveAssemblyReference.cache
+C:\Facultate\diploma\VisualBCM\obj\Debug\VisualBCM.Properties.Resources.resources
+C:\Facultate\diploma\VisualBCM\obj\Debug\VisualBCM.csproj.GenerateResource.Cache
+C:\Facultate\diploma\VisualBCM\obj\Debug\VisualBCM.exe
+C:\Facultate\diploma\VisualBCM\obj\Debug\VisualBCM.pdb
+C:\Facultate\diploma\VisualBCM\obj\Debug\VisualBCM.MainForm.resources
+C:\Facultate\diploma\VisualBCM\obj\Debug\VisualBCM.NetVisualiser.resources
+C:\Facultate\diploma\VisualBCM\obj\Debug\VisualBCM.GraphForm.resources
+C:\Facultate\diploma\VisualBCM\obj\Debug\VisualBCM.exe.licenses
+C:\Facultate\diploma\VisualBCM\obj\Debug\VisualBCM.StimulusForm.resources
+F:\facultate\diploma\VisualBCM\obj\Debug\VisualBCM.exe
+F:\facultate\diploma\VisualBCM\obj\Debug\VisualBCM.pdb
+F:\facultate\diploma\VisualBCM\obj\Debug\ResolveAssemblyReference.cache
+F:\facultate\diploma\VisualBCM\obj\Debug\VisualBCM.GraphForm.resources
+F:\facultate\diploma\VisualBCM\obj\Debug\VisualBCM.MainForm.resources
+F:\facultate\diploma\VisualBCM\obj\Debug\VisualBCM.Properties.Resources.resources
+F:\facultate\diploma\VisualBCM\obj\Debug\VisualBCM.NetVisualiser.resources
+F:\facultate\diploma\VisualBCM\obj\Debug\VisualBCM.StimulusForm.resources
+F:\facultate\diploma\VisualBCM\obj\Debug\VisualBCM.csproj.GenerateResource.Cache
+F:\facultate\diploma\VisualBCM\obj\Debug\VisualBCM.exe.licenses
+F:\facultate\diploma\VisualBCM\bin\Debug\VisualBCM.exe
+F:\facultate\diploma\VisualBCM\bin\Debug\VisualBCM.pdb
+F:\facultate\diploma\VisualBCM\bin\Debug\BCMToolbox.dll
+F:\facultate\diploma\VisualBCM\bin\Debug\BCMToolbox.pdb
+D:\work\temp\bcm\VisualBCM\obj\Debug\VisualBCM.exe
+D:\work\temp\bcm\VisualBCM\obj\Debug\VisualBCM.pdb
+D:\work\temp\bcm\VisualBCM\bin\Debug\VisualBCM.exe
+D:\work\temp\bcm\VisualBCM\bin\Debug\VisualBCM.pdb
+D:\work\temp\bcm\VisualBCM\bin\Debug\BCMToolbox.dll
+D:\work\temp\bcm\VisualBCM\bin\Debug\BCMToolbox.pdb
+D:\work\temp\bcm\VisualBCM\obj\Debug\ResolveAssemblyReference.cache
+D:\work\temp\bcm\VisualBCM\obj\Debug\VisualBCM.GraphForm.resources
+D:\work\temp\bcm\VisualBCM\obj\Debug\VisualBCM.MainForm.resources
+D:\work\temp\bcm\VisualBCM\obj\Debug\VisualBCM.Properties.Resources.resources
+D:\work\temp\bcm\VisualBCM\obj\Debug\VisualBCM.NetVisualiser.resources
+D:\work\temp\bcm\VisualBCM\obj\Debug\VisualBCM.StimulusForm.resources
+D:\work\temp\bcm\VisualBCM\obj\Debug\VisualBCM.csproj.GenerateResource.Cache
+D:\work\temp\bcm\VisualBCM\obj\Debug\VisualBCM.exe.licenses
