public double estimate(final QueryAtom atom) { return estimate(atom, new HashSet<ATermAppl>()); }
public double estimate(final List<QueryAtom> atoms) { return estimate(atoms, new HashSet<ATermAppl>()); }
public double estimate(final List<QueryAtom> atoms) { return estimate(atoms, new HashSet<ATermAppl>()); }
public double estimate(final QueryAtom atom) { return estimate(atom, new HashSet<ATermAppl>()); }
public double estimate(final List<QueryAtom> atoms) { return estimate(atoms, new HashSet<ATermAppl>()); }
public double estimate(final QueryAtom atom) { return estimate(atom, new HashSet<ATermAppl>()); }
public double estimate(final List<QueryAtom> atoms, final Collection<ATermAppl> bound) { double totalStaticCount = 1.0; double totalBranchCount = 1.0; _branchCount = 1; _staticCost = 1.0; final int n = atoms.size(); Set<ATermAppl> lastBound = new HashSet<>(bound); final List<Set<ATermAppl>> boundList = new ArrayList<>(n); for (int i = 0; i < n; i++) { final QueryAtom atom = atoms.get(i); boundList.add(lastBound); lastBound = new HashSet<>(lastBound); lastBound.addAll(atom.getArguments()); } for (int i = n - 1; i >= 0; i--) { final QueryAtom atom = atoms.get(i); estimate(atom, boundList.get(i)); totalBranchCount *= _branchCount; totalStaticCount = _staticCost + _branchCount * totalStaticCount; } _staticCost = totalStaticCount; _branchCount = totalBranchCount; return _staticCost; }
public double estimate(final List<QueryAtom> atoms, final Collection<ATermAppl> bound) { double totalStaticCount = 1.0; double totalBranchCount = 1.0; _branchCount = 1; _staticCost = 1.0; final int n = atoms.size(); Set<ATermAppl> lastBound = new HashSet<>(bound); final List<Set<ATermAppl>> boundList = new ArrayList<>(n); for (int i = 0; i < n; i++) { final QueryAtom atom = atoms.get(i); boundList.add(lastBound); lastBound = new HashSet<>(lastBound); lastBound.addAll(atom.getArguments()); } for (int i = n - 1; i >= 0; i--) { final QueryAtom atom = atoms.get(i); estimate(atom, boundList.get(i)); totalBranchCount *= _branchCount; totalStaticCount = _staticCost + _branchCount * totalStaticCount; } _staticCost = totalStaticCount; _branchCount = totalBranchCount; return _staticCost; }
public double estimate(final List<QueryAtom> atoms, final Collection<ATermAppl> bound) { double totalStaticCount = 1.0; double totalBranchCount = 1.0; _branchCount = 1; _staticCost = 1.0; final int n = atoms.size(); Set<ATermAppl> lastBound = new HashSet<>(bound); final List<Set<ATermAppl>> boundList = new ArrayList<>(n); for (int i = 0; i < n; i++) { final QueryAtom atom = atoms.get(i); boundList.add(lastBound); lastBound = new HashSet<>(lastBound); lastBound.addAll(atom.getArguments()); } for (int i = n - 1; i >= 0; i--) { final QueryAtom atom = atoms.get(i); estimate(atom, boundList.get(i)); totalBranchCount *= _branchCount; totalStaticCount = _staticCost + _branchCount * totalStaticCount; } _staticCost = totalStaticCount; _branchCount = totalBranchCount; return _staticCost; }
final double atomCost = _cost.estimate(atom2);
final double atomCost = _cost.estimate(atom2);
final double atomCost = _cost.estimate(atom2);
final double queryCost = _cost.estimate(orderedAtoms); _logger.fine("Cost " + queryCost + " for " + orderedAtoms); if (queryCost < minCost)
final double queryCost = _cost.estimate(orderedAtoms); _logger.fine("Cost " + queryCost + " for " + orderedAtoms); if (queryCost < minCost)
final double queryCost = _cost.estimate(orderedAtoms); _logger.fine("Cost " + queryCost + " for " + orderedAtoms); if (queryCost < minCost)