de.hpi.fgis.dude.postprocessor
Class NaiveTransitiveClosureGenerator
java.lang.Object
de.hpi.fgis.dude.postprocessor.NaiveTransitiveClosureGenerator
- All Implemented Interfaces:
- Iterable<DuDeObjectPair>
public class NaiveTransitiveClosureGenerator
- extends Object
- implements Iterable<DuDeObjectPair>
NaiveTransitiveClosureGenerator
implements the naive way of generating transitive closures. It is memory-based and not optimized in
any sense (simple nested-for-loop approach). The transitive closures can be returned in two ways:
Using getTransitiveClosures()
- this will return a 2-dimensional collection with each DuDeObject
listed in its transitive
closure.
Using the Iterator
interface - this will return all DuDeObjectPair
s.
- Author:
- Matthias Pohl, David Sonnabend
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NaiveTransitiveClosureGenerator
public NaiveTransitiveClosureGenerator()
add
public void add(DuDeObjectPair pair)
- Adds a pair to the
NaiveTransitiveClosureGenerator
.
- Parameters:
pair
- The pair that shall be added.
add
public void add(Collection<DuDeObjectPair> pairs)
- Adds a
Collection
of pairs to the NaiveTransitiveClosureGenerator
.
- Parameters:
pairs
- The pairs that shall be added.
getTransitiveClosures
public Collection<? extends Collection<DuDeObject>> getTransitiveClosures()
- Returns the transitive closures as a 2-dimensional collection.
- Returns:
- The transitive closures.
iterator
public Iterator<DuDeObjectPair> iterator()
- Specified by:
iterator
in interface Iterable<DuDeObjectPair>
Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.