All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.aksw.jena_sparql_api.views.Alignment Maven / Gradle / Ivy

There is a newer version: 3.17.0-1
Show newest version
package org.aksw.jena_sparql_api.views;

import java.util.List;

import org.aksw.commons.util.Pair;
import org.apache.jena.sparql.expr.Expr;

/**
 * 
 * The following optimizations are currently implemented:
 * 
 * - f(argsA) = f(argsB) -> argA_0 = argB_0 && ... && argA_n = argB_n
 *   Currently this rule is always applied, however it is only true for
 *   deterministic, side-effect free functions.
 *   It will cause pitfalls if anyone every tried something like rand() = rand():
 *   This will return always true (i think - but maybe not)
 *    
 * 
 * The following optimizations are about to be implemented:
 * 
 * - Inverse function on variables
 *  op(f(expr_with_vars), const) -> op(expr_with_var, f^-1(const)) (if f^-1 exists) 
 * 
 *    op can be =, <, > ... (not sure right now whether the shift in semantics is acceptable)
 *    Also note, that this optization currently does not take function indexes into account.
 *    So if there was in index f(x) our optimization would be wrong in thinking that using x alone is better.
 *    
 * 
 * 
 * 
 * @author Claus Stadler
 *
 */

public class Alignment
	extends Pair, List>
{
	public Alignment(List key, List value) {
		super(key, value);
	}		

	public boolean isSameSize() {
		return this.getKey().size() == this.getValue().size();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy