public NonHierarchicAnalyzerCoeffEngine(NonHierarchicContainer c, List <double> info) { container = c; edgesBetweenNeighbours = info; CoefficientsDistribution = new SortedDictionary <Double, Double>(); CoefficientsPerVertex = new SortedDictionary <Double, Double>(); }
public BaseModel(int vertexcount) { vertexcount_ = vertexcount; edgespervertex_ = 1; container_ = new NonHierarchicContainer(); fitnesses_ = new List <double>(vertexcount_); }
public PivotsCyclesCounter(IThreadEventHandler handler, NonHierarchicContainer container, int pivot, int cycleLength) { _handler = handler; _container = container; _pivot = pivot; _cycleLength = cycleLength; }
public BaseModel(int vertexcount, int edgespervertex, string function_str) { vertexcount_ = vertexcount; edgespervertex_ = edgespervertex; distributed_random_ = new DistributedRandom(function_str); container_ = new NonHierarchicContainer(); fitnesses_ = new List <double>(vertexcount_); }
public CyclesCounterDoubleThreaded(NonHierarchicContainer container) { _container = container; _verticesCount = (int)_container.Size; _marked = new bool[_verticesCount]; for (int i = 0; i < _verticesCount; ++i) { unmark(i); } _stack = new Stack <int>(); _path = new Stack <int>(); }
public CyclesCounterDoubleThreaded(NonHierarchicContainer container) { _container = container; _verticesCount = (int)_container.Size; _marked = new bool[_verticesCount]; for (int i = 0; i < _verticesCount; ++i) { unmark(i); } _stack = new Stack<int>(); _path = new Stack<int>(); }
private void Generate(uint stepCount, double probability, uint edges) { GenerateInitialGraph(probability); container = initialcontainer; while (stepCount > 0) { double[] probabilyArray = container.CountProbabilities(); container.AddVertex(); container.RefreshNeighbourships(MakeGenerationStep(probabilyArray, edges)); --stepCount; } }
public NonHierarchicAnalyzerEvolutionEngine(AbstractNetwork n, NonHierarchicContainer c, bool vm, Int32 s, Double o, Boolean p, Int32 t, Double cycles3) { network = n; container = c; visualMode = vm; stepCount = s; omega = o; permanentDistribution = p; tracingStepIncrement = t; currentCycle3Count = cycles3; Cycles3Trajectory = new SortedDictionary <Double, Double>(); if (visualMode) { EvolutionInformation = new List <List <EdgesAddedOrRemoved> >(); } }
public WSNetworkGenerator() { container = new NonHierarchicContainer(); }
public HMNetworkGenerator(ContainerMode containerMode) : base(containerMode) { container = new NonHierarchicContainer(containerMode); rand = new RNGCrypto(); node = 0; }
public BANetworkGenerator(ContainerMode mode) : base(mode) { container = new NonHierarchicContainer(this.containerMode); initialcontainer = new NonHierarchicContainer(this.containerMode); }
public void Calculate() { NonHierarchicContainer containerToChange = (NonHierarchicContainer)container.Clone(); containerToChange.InitializeEvolutionInformation(); RNGCrypto rand = new RNGCrypto(); int currentStep = 0, currentTracingStep = tracingStepIncrement; Cycles3Trajectory.Add(currentStep, currentCycle3Count); while (currentStep != stepCount) { NonHierarchicContainer savedContainer = (NonHierarchicContainer)containerToChange.Clone(); ++currentStep; List <EdgesAddedOrRemoved> edges = visualMode ? new List <EdgesAddedOrRemoved>() : null; double deltaCount = permanentDistribution ? containerToChange.PermanentRandomization(ref edges) : containerToChange.NonPermanentRandomization(ref edges); double newCycle3Count = currentCycle3Count + deltaCount; int delta = (int)(newCycle3Count - currentCycle3Count); if (delta > 0) // accept case { Cycles3Trajectory.Add(currentStep, newCycle3Count); if (visualMode) { EvolutionInformation.Add(edges); } currentCycle3Count = newCycle3Count; } else { double probability = Math.Exp((-omega * Math.Abs(delta))); if (rand.NextDouble() < probability) // accept case { Cycles3Trajectory.Add(currentStep, newCycle3Count); if (visualMode) { EvolutionInformation.Add(edges); } currentCycle3Count = newCycle3Count; } else // reject case { Cycles3Trajectory.Add(currentStep, currentCycle3Count); containerToChange = savedContainer; } } network.UpdateStatus(NetworkStatus.StepCompleted); // TODO closed Trace /*if (currentTracingStep == currentStep) * { * container.Trace(network.ResearchName, * "Realization_" + network.NetworkID.ToString(), * "Matrix_" + currentTracingStep.ToString()); * currentTracingStep += tracingStepIncrement; * * network.UpdateStatus(NetworkStatus.StepCompleted); * }*/ } }
public NonHierarchicAnalyzerCompleteEngine(NonHierarchicContainer c) { container = c; CompleteDistribution = new SortedDictionary <Double, Double>(); }
public ERNetworkGenerator(ContainerMode containerMode) : base(containerMode) { container = new NonHierarchicContainer(containerMode); }
public CyclesCounter(NonHierarchicContainer container) { _container = container; _verticesCount = (int)_container.Size; _counter = new CyclesParallelCounter(container); }
public CyclesParallelCounter(NonHierarchicContainer container) { _container = container; _verticesCount = (int)_container.Size; _counters = new PivotsCyclesCounter[_verticesCount]; }
public NonHierarchicAnalyzerPathEngine(NonHierarchicContainer c) { container = c; DistanceDistribution = new SortedDictionary <Double, Double>(); }
public WSNetworkGenerator(ContainerMode mode) : base(mode) { container = new NonHierarchicContainer(mode); }