1. I put values on edges. Can I put values on nodes ?

Of course, you can use the same methods on nodes that you used on edges. In fact, the valuation system can be used on nodes, edges, node sets, edge sets, chains and graphs ! In fact, all this classes derives of the classes MascoptSet and MascoptObject which implement the valuation system.

2. I have a out of memory error...

Bad luck. You should try:

java  -Xmx655360000 -Xss655360000 myClass

to increase the memory allocated to Virtual Machine.

3. I made a sub-graph, with the graph constructor but I cannot put new edges in this graph, why ?

As all we did, you may have misunderstood the sub-set notion. You will never be able to add this new arcs in your set, because this set is a sub-set and its super-set does not contains your new arcs. In your case, you should create a new graph, totally independent from the first one.

4. I have a null pointer exeception. How can i debug something ?

Bad luck to ! We have no debugger in Java to go into the code when the program runs. The only think you could do is to use System.out.println.

If you have intensive debugging to perform, we have created a class "Trace" which give the possibility to put many traces in the program and to activate or deactivate the output of the trace. To use the Trace class, you should import it via:

import mascoptLib.util.Trace;


Trace.println("Mon message");

To switch between the modes (output/no output), just use:


Note also that it exist different types of trace. The trace MEMORY, ERROR. You can see it in the javadoc (static fields). There is a additional parameter to classify the types of the traces, which can be useful.

5. Can i put some values on the objects of Mascopt ?

Yes, it's what we call the valuation system. It is described in the guide, in the valuation system page.

6. Why I cannot get a Double or an Integer from a .mgl file ?

Because, probably, the guy who made the file stored the values in type String. You have then to import these values in String via getValue(), and then convert it in Double or Intger. See the the guide, in the valuation system page.

7. Is there any way to attach an object to a Vertex? I have seen that I can attach primitive types and strings and encapsulated primitive types, but in my case I would like to have an object. Con this be done ?

No, because it is not really a good way of writting object programs... But you can solve this problem in two ways:

1 - Define an HashMap, which will contain the correspondence between a vertex and your object (or using two vectors). With an Hashmap, you can find the object from a vertex in logarithmic time.

2 - You create a new class, for example "MySpecialVertex" which is a specialized Vertex (it derives). Then, in this subclass you can create new attributes and methods.