net.sf.opendse.generator
Class MappingGenerator

java.lang.Object
  extended by net.sf.opendse.generator.Generator
      extended by net.sf.opendse.generator.MappingGenerator

public class MappingGenerator
extends Generator

The MappingGenerator contains several methods to generate and transform mappings.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.opendse.generator.Generator
Generator.Type
 
Field Summary
protected  IdProvider mappingId
           
 
Fields inherited from class net.sf.opendse.generator.Generator
random
 
Constructor Summary
MappingGenerator()
          Constructs a MappingGenerator with a random seed.
MappingGenerator(long seed)
          Constructs a MappingGenerator with a given seed.
MappingGenerator(long seed, IdProvider mappingId)
          Constructs a MappingGenerator.
 
Method Summary
 void annotateAttribute(net.sf.opendse.model.Mappings<net.sf.opendse.model.Task,net.sf.opendse.model.Resource> mappings, java.lang.String attribute, int min, int max)
           
 net.sf.opendse.model.Mappings<net.sf.opendse.model.Task,net.sf.opendse.model.Resource> create(net.sf.opendse.model.Application<net.sf.opendse.model.Task,net.sf.opendse.model.Dependency> application, net.sf.opendse.model.Architecture<net.sf.opendse.model.Resource,net.sf.opendse.model.Link> architecture, int min, int max)
          Creates mappings.
 net.sf.opendse.model.Mappings<net.sf.opendse.model.Task,net.sf.opendse.model.Resource> create(net.sf.opendse.model.Application<net.sf.opendse.model.Task,net.sf.opendse.model.Dependency> application, java.util.Collection<net.sf.opendse.model.Resource> resources, int min, int max)
          Creates mappings.
 
Methods inherited from class net.sf.opendse.generator.Generator
annotateAttribute, rand, rand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mappingId

protected final IdProvider mappingId
Constructor Detail

MappingGenerator

public MappingGenerator()
Constructs a MappingGenerator with a random seed.


MappingGenerator

public MappingGenerator(long seed)
Constructs a MappingGenerator with a given seed.


MappingGenerator

public MappingGenerator(long seed,
                        IdProvider mappingId)
Constructs a MappingGenerator.

Parameters:
seed - the seed
mappingId - the provider for the mapping ids
Method Detail

create

public net.sf.opendse.model.Mappings<net.sf.opendse.model.Task,net.sf.opendse.model.Resource> create(net.sf.opendse.model.Application<net.sf.opendse.model.Task,net.sf.opendse.model.Dependency> application,
                                                                                                     net.sf.opendse.model.Architecture<net.sf.opendse.model.Resource,net.sf.opendse.model.Link> architecture,
                                                                                                     int min,
                                                                                                     int max)
Creates mappings.

Parameters:
application - the application
architecture - the architecture
min - the minimal number of mappings per task
max - the maximal number of mappings per task
Returns:
the mappings

create

public net.sf.opendse.model.Mappings<net.sf.opendse.model.Task,net.sf.opendse.model.Resource> create(net.sf.opendse.model.Application<net.sf.opendse.model.Task,net.sf.opendse.model.Dependency> application,
                                                                                                     java.util.Collection<net.sf.opendse.model.Resource> resources,
                                                                                                     int min,
                                                                                                     int max)
Creates mappings.

Parameters:
application - the application
resources - the resources
min - the minimal number of mappings per task
max - the maximal number of mappings per task
Returns:
the mappings

annotateAttribute

public void annotateAttribute(net.sf.opendse.model.Mappings<net.sf.opendse.model.Task,net.sf.opendse.model.Resource> mappings,
                              java.lang.String attribute,
                              int min,
                              int max)