Changeset 151


Ignore:
Timestamp:
03/01/14 22:07:48 (6 years ago)
Author:
sz
Message:

(c) header added

Location:
cpp/frams
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/canvas/canvasutil.cpp

    r147 r151  
     1// This file is a part of the Framsticks GDK.
     2// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
     3// Refer to http://www.framsticks.com/ for further information.
     4
    15#include "canvasutil.h"
    26
  • cpp/frams/canvas/neurodiagram.cpp

    r147 r151  
     1// This file is a part of the Framsticks GDK.
     2// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
     3// Refer to http://www.framsticks.com/ for further information.
     4
    15#include "neurodiagram.h"
    26#include "nn_layout.h"
     
    8589void NeuroDiagram::hide()
    8690{
    87         NeuroProbe *pr;
    8891        showing_not_alive_label = 0;
    8992        if (o) o->delmodel_list.remove(killnode);
    90         for (probes.start(); pr = (NeuroProbe*)probes();) delete pr;
     93        FOREACH(NeuroProbe*,pr,probes)
     94                delete pr;
    9195        probes.clear();
    9296        selection.clear(0);
     
    287291        for (int iw = 0; iw < n->getInputCount(); iw++)
    288292        {
    289                 ns2 = diagram.getNS(n->getInput(iw)->refno);// the other NeuroSymbol (our input will connecto to its output)
     293                ns2 = diagram.getNS(n->getInput(iw)->refno); // the other NeuroSymbol (our input will connect to its output)
    290294
    291295                int yw = inputY(iw);
    292                 int xw = yw / 4;// x coordinate of the first corner point, depends on yw to avoid overlapping between inputs
     296                int xw = yw / 4; // x coordinate of the first corner point, depends on yw to avoid overlapping between inputs
    293297                drawLine(size.x / 4, yw, xw, yw); // first horizontal segment (to the left)
    294298                diagram.setWireColor(ns2->n->state, 0);
    295299                if ((diagram.linetype != 1) || (ns2->pos.x + ns2->size.x / 2 < pos.x))
    296                 { // straight line to the other neuron's output (signal goes forwards)
     300                { // straight line to the other neuron's output (the signal goes forwards)
    297301                        ns2->lineTo(ns2->size.x, ns2->size.y / 2);
    298302                }
    299303                else
    300                 { // make a loop from 3 segments - vert/horiz/vert (signal goes backwards)
     304                { // make an U-shaped loop from 3 segments - vert/horiz/vert (the signal goes backwards)
    301305                        int y2;
    302306                        int down;
     
    542546                {
    543547                        NeuroImpl *ni = NeuroNetImpl::getImpl(link->n);
    544                         if (ni) ni->setCurrentState(st, chsel);//tu bylo odwrotnie!
     548                        if (ni) ni->setCurrentState(st, chsel);
    545549                }
    546550                requestPaint();
     
    645649void NeuroDiagram::probeSampling(void*obj, long dummy)
    646650{
    647         NeuroProbe *pr;
    648         for (probes.start(); pr = (NeuroProbe*)probes();) pr->sampling();
     651        FOREACH(NeuroProbe*,pr,probes) pr->sampling();
    649652        requestPaint();
    650653}
  • cpp/frams/genetics/preconfigured.h

    r145 r151  
     1// This file is a part of the Framsticks GDK.
     2// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
     3// Refer to http://www.framsticks.com/ for further information.
     4
    15#ifndef _PRECONFIGURED_GENETICS_H_
    26#define _PRECONFIGURED_GENETICS_H_
Note: See TracChangeset for help on using the changeset viewer.