Package lupos.engine.operators

Examples of lupos.engine.operators.OperatorIDTuple


        // add new connections...
        _label_b_count = 0;

        for(lupos.engine.operators.BasicOperator _child : this.o_under) {
            new_j.addSucceedingOperator(new OperatorIDTuple(_child, _label_b[_label_b_count]));
            _child.addPrecedingOperator(new_j);

            _label_b_count += 1;
        }


        _label_a_count = 0;

        for(lupos.engine.operators.BasicOperator _parent : this.o) {
            _parent.addSucceedingOperator(new OperatorIDTuple(new_j, _label_a[_label_a_count]));
            new_j.addPrecedingOperator(_parent);

            _label_a_count += 1;
        }
View Full Code Here


      final Collection<? extends MultiInputOperator> operators,
      final ResultCollector col, final boolean optional) {
    this.operators = operators;
    this.col = col;
    for (final MultiInputOperator join : operators) {
      join.setSucceedingOperator(new OperatorIDTuple(col, 0));
    }
    this.hashFun = new HashFunction();
    this.threadList = new ArrayList<ParallelJoiner>(operators.size());
    this.optional = optional;
  }
View Full Code Here

    final BoundVariablesMessage msg_result = new BoundVariablesMessage(msg);
    Set<Variable> variableSet = null;
    // the variables, which are always bound are the intersection
    // variables of the left hand side
    for (final BasicOperator parent : this.getPrecedingOperators()) {
      final OperatorIDTuple opID = parent.getOperatorIDTuple(this);
      if (opID.getId() == 0) {
        if (variableSet == null) {
          variableSet = new HashSet<Variable>();
          if(parent.getIntersectionVariables()!=null){
            variableSet.addAll(parent.getIntersectionVariables());
          } else {
View Full Code Here

        }

        _label_a_count = 0;

        for(final lupos.engine.operators.singleinput.filter.Filter _parent : f_new) {
            _parent.addSucceedingOperator(new OperatorIDTuple(this.op, _label_a[_label_a_count]));
            this.op.addPrecedingOperator(_parent);

            _label_a_count += 1;
        }
View Full Code Here

    // if all variables that must be compared are always bound in every
    // binding, then they can easily be presorted,
    // we check this
    for (BasicOperator parent : this.getPrecedingOperators()) {
      OperatorIDTuple opID = parent.getOperatorIDTuple(this);
      if (opID.getId() == 0) {
        if (leftUnion == null) {
          leftUnion = new HashSet<Variable>();
          leftUnion.addAll(parent.getIntersectionVariables());
        } else {
          leftUnion.retainAll(parent.getIntersectionVariables());
        }
      } else if (opID.getId() == 1) {
        if (rightUnion == null) {
          rightUnion = new HashSet<Variable>();
          rightUnion.addAll(parent.getIntersectionVariables());
        } else {
          rightUnion.retainAll(parent.getIntersectionVariables());
View Full Code Here

        return _result;
    }

    protected void replace(HashMap<Class<?>, HashSet<BasicOperator>> _startNodes) {
        // remove obsolete connections...
        this.o0.removeSucceedingOperator(new OperatorIDTuple(this.opt, 0));
        this.opt.removePrecedingOperator(this.o0);
        this.opt.removeSucceedingOperator(this.p);
        this.p.removePrecedingOperator(this.opt);
        this.o1.removeSucceedingOperator(new OperatorIDTuple(this.opt, 1));
        this.opt.removePrecedingOperator(this.o1);

        // add new operators...

View Full Code Here

              // System.out.println("TTTTTTTTTTTTTbefore:"+o.
              // graphString
              // ());
              final Filter filter2 = (Filter) filter.clone();
              added.add(filter2);
              final OperatorIDTuple oit = o
                  .getOperatorIDTuple(operator);
              filter2.setSucceedingOperator(new OperatorIDTuple(
                  operator, oit.getId()));
              final HashSet<Variable> hsv = new HashSet<Variable>();
              hsv.addAll(o.getIntersectionVariables());
              filter2.setIntersectionVariables(hsv);
              filter2.setUnionVariables(hsv);
              // System.out.println("TTTTTTTTTTTTToit:"+oit);
              o.replaceOperatorIDTuple(oit, new OperatorIDTuple(
                  filter2, 0));
              operator
                  .setPrecedingOperators(new LinkedList<BasicOperator>());
              //System.out.println("TTTTTTTTTTTTT"+o.graphString()
              // );
View Full Code Here

  @Override
  protected void init() {
    final ReplaceLit replaceLit = new ReplaceLit();
    final Union union = new Union();

    replaceLit.setSucceedingOperator(new OperatorIDTuple(union, -1));
    union.setPrecedingOperator(replaceLit);

    subGraphMap = new HashMap<BasicOperator, String>();
    subGraphMap.put(replaceLit, "replaceLit");
    subGraphMap.put(union, "union");
View Full Code Here

    // Connect the precessors of the ReplaceLit directly to the Union
    for (int i = 0; i < pres.size(); i++) {
      pre = pres.get(i);
      union.addPrecedingOperator(pre);
      pre.removeSucceedingOperator(replaceLit);
      pre.addSucceedingOperator(new OperatorIDTuple(union, index));
    }
    union.removePrecedingOperator(replaceLit);

    // ReplaceLit becomes the new sucessor of Union
    union.setSucceedingOperator(new OperatorIDTuple(replaceLit, 0));

    // ReplaceLit gets the joins old sucessors
    replaceLit.setPrecedingOperator(union);
    replaceLit.setSucceedingOperators(succs);
View Full Code Here

    added.add(addBinding);

    addBinding.setSucceedingOperators(triplePattern
        .getSucceedingOperators());

    triplePattern.setSucceedingOperator(new OperatorIDTuple(addBinding, 0));

    rootOperator.deleteParents();
    rootOperator.setParents();
    rootOperator.detectCycles();
    rootOperator.sendMessage(new BoundVariablesMessage());
View Full Code Here

TOP

Related Classes of lupos.engine.operators.OperatorIDTuple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.