public class FunctionalDependencyHelper
extends java.lang.Object
Constructor and Description |
---|
FunctionalDependencyHelper() |
Modifier and Type | Method and Description |
---|---|
static <A> java.util.Set<A> |
closureOf(java.util.Collection<A> attributes,
java.util.Map<java.util.Set<A>,java.util.Set<A>> dependencies)
Get the closure of the specified attribute set relative to the specified functional dependencies.
|
static <A> void |
includeDependencies(java.util.Map<java.util.Set<A>,java.util.Set<A>> accumulator,
java.util.Map<java.util.Set<A>,java.util.Set<A>> additionalDependencies)
Adds all given dependencies to a mutable accumulator.
|
static <A> void |
includeDependency(java.util.Map<java.util.Set<A>,java.util.Set<A>> accumulator,
java.util.Set<A> left,
java.util.Set<A> right)
Adds a given dependency to a mutable accumulator.
|
static <A> boolean |
isTrivial(java.util.Set<A> left,
java.util.Set<A> right) |
static <A> java.util.Map<java.util.Set<A>,java.util.Set<A>> |
projectDependencies(java.util.Map<java.util.Set<A>,java.util.Set<A>> originalDependencies,
java.util.Set<A> targetAttributes)
Returns the dependency set over attributes in
targetAttributes that are implied by a given source dependency set. |
public static <A> java.util.Set<A> closureOf(java.util.Collection<A> attributes, java.util.Map<java.util.Set<A>,java.util.Set<A>> dependencies)
attributes
- The attributes to get the closure of.dependencies
- The functional dependencies of which the closure operation is relative to.public static <A> boolean isTrivial(java.util.Set<A> left, java.util.Set<A> right)
public static <A> java.util.Map<java.util.Set<A>,java.util.Set<A>> projectDependencies(java.util.Map<java.util.Set<A>,java.util.Set<A>> originalDependencies, java.util.Set<A> targetAttributes)
targetAttributes
that are implied by a given source dependency set.
Note: exponential in the size of the target attribute set.
Note: minimality of the returned dependency set is currently not guaranteed.
originalDependencies
- all dependencies that are known to hold on a wider set of attributestargetAttributes
- the set of attributes we are interested inpublic static <A> void includeDependency(java.util.Map<java.util.Set<A>,java.util.Set<A>> accumulator, java.util.Set<A> left, java.util.Set<A> right)
public static <A> void includeDependencies(java.util.Map<java.util.Set<A>,java.util.Set<A>> accumulator, java.util.Map<java.util.Set<A>,java.util.Set<A>> additionalDependencies)