Permalink
Browse files

Moved updates from private to public repo.

  • Loading branch information...
Luis Guimbarda
Luis Guimbarda committed Mar 22, 2012
1 parent 9bec78f commit 509c673e502f0c27daa6b91f39cc298404b59ae2
Showing with 361 additions and 2,161 deletions.
  1. +2 −2 xnet/demos/src/main/java/com/xtructure/xnet/demos/oned/components/OneDCritterImpl.java
  2. +0 −63 xnet/xart/src/main/java/com/xtructure/art/examples/twonode/Border.java
  3. +0 −125 xnet/xart/src/main/java/com/xtructure/art/examples/twonode/LinkTracer.java
  4. +0 −287 xnet/xart/src/main/java/com/xtructure/art/examples/twonode/LinkVisualization.java
  5. +0 −376 xnet/xart/src/main/java/com/xtructure/art/examples/twonode/Main.java
  6. +0 −115 xnet/xart/src/main/java/com/xtructure/art/examples/twonode/NetworkImpl.java
  7. +0 −127 xnet/xart/src/main/java/com/xtructure/art/examples/twonode/NodeTracer.java
  8. +0 −273 xnet/xart/src/main/java/com/xtructure/art/examples/twonode/NodeVisualization.java
  9. +0 −35 xnet/xart/src/test/java/com/xtructure/art/examples/twonode/ITestTwoNode.java
  10. +2 −4 xnet/xart/src/test/java/com/xtructure/art/model/network/DummyNetwork.java
  11. +0 −73 xnet/xevolution/src/main/java/com/xtructure/xevolution/demo/arith/ArithmeticCrossoverOperator.java
  12. +0 −47 xnet/xevolution/src/main/java/com/xtructure/xevolution/demo/arith/ArithmeticEvaluationStrategy.java
  13. +0 −126 xnet/xevolution/src/main/java/com/xtructure/xevolution/demo/arith/ArithmeticExperiment.java
  14. +0 −68 xnet/xevolution/src/main/java/com/xtructure/xevolution/demo/arith/ArithmeticGeneticsFactory.java
  15. +0 −134 xnet/xevolution/src/main/java/com/xtructure/xevolution/demo/arith/ArithmeticGenomeDecoder.java
  16. +0 −83 xnet/xevolution/src/main/java/com/xtructure/xevolution/demo/arith/ArithmeticMutateOperator.java
  17. +171 −78 xnet/xevolution/src/main/java/com/xtructure/xevolution/gui/XEvolutionGui.java
  18. +14 −15 xnet/xevolution/src/main/java/com/xtructure/xevolution/gui/components/Graph.java
  19. +6 −1 xnet/xevolution/src/main/java/com/xtructure/xevolution/gui/components/MenuBar.java
  20. +42 −11 xnet/xevolution/src/main/java/com/xtructure/xevolution/tool/DataXIdObject.java
  21. +5 −0 xnet/xevolution/src/main/java/com/xtructure/xevolution/tool/PopulationData.java
  22. +49 −29 xnet/xevolution/src/main/java/com/xtructure/xevolution/tool/data/AbstractDataXIdObject.java
  23. +65 −29 xnet/xevolution/src/main/java/com/xtructure/xevolution/tool/data/AbstractPopulationData.java
  24. +2 −1 xnet/xevolution/src/main/java/com/xtructure/xevolution/tool/data/DataTracker.java
  25. +0 −53 xnet/xevolution/src/test/java/com/xtructure/xevolution/demo/arith/ITestArithExperiment.java
  26. +3 −2 xnet/xutil/src/main/java/com/xtructure/xutil/id/XId.java
  27. +0 −4 xnet/xutil/src/main/java/com/xtructure/xutil/valid/meta/AndCondition.java
@@ -42,13 +42,13 @@
import javolution.xml.stream.XMLStreamException;
import com.sun.tools.javac.util.Pair;
-import com.xtructure.art.examples.twonode.LinkVisualization;
-import com.xtructure.art.examples.twonode.NodeVisualization;
import com.xtructure.art.model.link.Link;
import com.xtructure.art.model.link.LinkConfiguration;
import com.xtructure.art.model.network.AbstractNetwork;
import com.xtructure.art.model.node.Node;
import com.xtructure.art.model.node.NodeConfiguration;
+import com.xtructure.xnet.demos.art.LinkVisualization;
+import com.xtructure.xnet.demos.art.NodeVisualization;
import com.xtructure.xutil.id.XId;
import com.xtructure.xutil.xml.ReadAttributes;
import com.xtructure.xutil.xml.ReadElements;
@@ -1,63 +0,0 @@
-/*
- * Copyright 2012 Michael Roberts
- * All rights reserved.
- *
- *
- * This file is part of xart.
- *
- * xart is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the
- * Free Software Foundation, either version 3 of the License, or (at your
- * option) any later version.
- *
- * xart is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with xart. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package com.xtructure.art.examples.twonode;
-
-import java.util.Map;
-
-import com.xtructure.art.model.network.AbstractNetwork;
-import com.xtructure.art.model.node.Node;
-import com.xtructure.xsim.impl.AbstractXBorder;
-import com.xtructure.xsim.impl.XAddressImpl;
-import com.xtructure.xutil.id.XId;
-
-/**
- * @author Luis Guimbarda
- *
- */
-public final class Border extends AbstractXBorder {
-
- public Border(//
- AbstractNetwork producer,//
- AbstractNetwork consumer, //
- Map<XId, XId> outputInputMap) {
- super();
- Transform transform = new Transform() {
- @Override
- public Object transform(Object orig) {
- Node outputSource = (Node) orig;
- return outputSource.getEnergies().getFrontEnergy();
- }
- };
-
- for (Object key : outputInputMap.keySet()) {
- XId outputSourceId = (XId) key;
- XId inputTargetId = outputInputMap.get(key);
-
- associate(//
- new XAddressImpl(producer, outputSourceId),//
- transform,//
- new XAddressImpl(consumer, inputTargetId));
- }
- producer.addBorder(this);
- consumer.addBorder(this);
- }
-}
@@ -1,125 +0,0 @@
-/*
- * Copyright 2012 Michael Roberts
- * All rights reserved.
- *
- *
- * This file is part of xart.
- *
- * xart is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the
- * Free Software Foundation, either version 3 of the License, or (at your
- * option) any later version.
- *
- * xart is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with xart. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package com.xtructure.art.examples.twonode;
-
-import static com.xtructure.xutil.valid.ValidateUtils.isGreaterThanOrEqualTo;
-import static com.xtructure.xutil.valid.ValidateUtils.isLessThanOrEqualTo;
-import static com.xtructure.xutil.valid.ValidateUtils.validateState;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import com.xtructure.art.model.link.Link;
-import com.xtructure.xsim.XAddress;
-import com.xtructure.xsim.impl.AbstractStandardXComponent;
-import com.xtructure.xsim.impl.AbstractStandardXSimulation;
-import com.xtructure.xutil.id.XId;
-
-/**
- * The Class LinkTracer.
- *
- * @author Luis Guimbarda
- */
-public class LinkTracer extends AbstractStandardXComponent {
-
- /** The EXPECTED values. */
- private final List<Float> EXPECTED_VALUES;
-
- /** The ITERATOR. */
- private final Iterator<Float> ITERATOR;
-
- /** The EPSILON. */
- private final float EPSILON;
-
- /** The SIM. */
- private final AbstractStandardXSimulation SIM;
-
- /**
- * Gets the single instance of LinkTracer.
- *
- * @param id the id
- * @param sim the sim
- * @param link the link
- * @param expectedValues the expected values
- * @param epsilon the epsilon
- * @return single instance of LinkTracer
- */
- public static LinkTracer getInstance(XId id, AbstractStandardXSimulation sim, Link link, List<Float> expectedValues, Float epsilon) {
- return new LinkTracer(id, sim, Collections.singleton(link.getId()), expectedValues, epsilon);
- }
-
- /**
- * Instantiates a new link tracer.
- *
- * @param id the id
- * @param sim the sim
- * @param targetIds the target ids
- * @param expectedValues the expected values
- * @param epsilon the epsilon
- */
- private LinkTracer(XId id, AbstractStandardXSimulation sim, Set<XId> targetIds, List<Float> expectedValues, Float epsilon) {
- super(id, null, targetIds);
- EXPECTED_VALUES = new ArrayList<Float>();
- EXPECTED_VALUES.addAll(expectedValues);
- ITERATOR = EXPECTED_VALUES.iterator();
- EPSILON = epsilon == null ? 0.0f : epsilon;
- SIM = sim;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.xtructure.xsim.impl.AbstractStandardXComponent#addForeignData(com
- * .xtructure.xutil.id.XId, com.xtructure.xsim.XAddress, java.lang.Object)
- */
- @Override
- protected void addForeignData(XId targetId, XAddress sourceAddress, Object data) {
- if (ITERATOR.hasNext()) {
- Float expected = ITERATOR.next();
- // System.out.println(String.format("Tracer %s => Checking %s at time %s: expected(%f) seen(%f)", getId(), sourceAddress.getPartId(), SIM.getTime(), data, expected));
- validateState(sourceAddress.getPartId().toString(), data, isGreaterThanOrEqualTo(expected - EPSILON), isLessThanOrEqualTo(expected + EPSILON));
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.xtructure.xsim.XComponent#getData(com.xtructure.xutil.id.XId)
- */
- @Override
- public Object getData(XId partId) {
- return null;
- }
-
- /**
- * Gets the sim.
- *
- * @return the sim
- */
- public AbstractStandardXSimulation getSIM() {
- return SIM;
- }
-}
Oops, something went wrong.

0 comments on commit 509c673

Please sign in to comment.