swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What is the mistake ?!


From: Mehrez Essafi
Subject: What is the mistake ?!
Date: Sat, 5 Aug 2000 09:06:11 GMT

I found difficulties building an histogram in a java version application and
I have'nt an exemple of that. So, can you tell me what is the mistake in this
extract of code or give me a sample program showing how to do that.

######

import swarm.analysis.EZBin;
import swarm.analysis.EZBinImpl;

import swarm.analysis.EZBinC;
import swarm.analysis.EZBinCImpl;

..

public EZBin intentionHisto;
public EZBinC IntHisto;

..

try {
    IntHisto = new EZBinCImpl (intentionHisto);
    System.out.println("begin");
    IntHisto.createBegin(getZone());
    IntHisto.setBinCount((int) 10);
    IntHisto.setCollection(modelSwarm.getActorsList());
    IntHisto.setTitle("Intentions acitvity Histogram");
    IntHisto.setGraphics(true);
    IntHisto.setAxisLabelsX$Y ("Intention", "Activity");
    IntHisto.setProbedSelector(new Selector (Class.forName("Actor"), 
"getAssimilation",
false));
    IntHisto.setLowerBound((double) 0);
    IntHisto.setUpperBound((double) 100);
    IntHisto.createEnd();
    intentionHisto = new EZBinImpl (getZone()); 
    } catch (Exception e) {
    System.out.println ("Exception : " + e.getMessage ());
    }

..

intentionHisto.update();

######

suggestion :
------------

I suggest to create a set of simple and short samples of code (in objective-C
AND THEIR TRANSLATION INTO JAVA VERSIONS, as it is with the exemples of HeatBugs
and MouseTrap), which will be published on the Web, showing the possibilities
of use of the different (at least, the most useful) Swarm-Libraries. 
This will be great helpfull for all the Swarm users how will be inspired from
these samples.
http://www.ati.tn

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]