Examples of vars()


Examples of cc.redberry.core.tensor.Integral.vars()

    public Tensor transform(final Tensor tensor) {
        if (!(tensor instanceof Integral))
            return tensor;
        final Integral integral = (Integral) tensor;
        final Tensor target = integral.target();
        final SimpleTensor[] vars = integral.vars();
        if (!(target instanceof Sum))
            return tensor;
        Sum result = new Sum();
        for (Tensor summand : target)
            result.add(new Integral(summand.clone(), clone(vars)));
View Full Code Here

Examples of cc.redberry.core.tensor.Integral.vars()

                    if (map.containsKey(st.getName()))
                        continue out_for;

                //current can be placed under current integral
                final Integral integral = integrals.get(i);
                integrals.set(i, new Integral(new Product(current, integral.target()), integral.vars()));
                iterator.remove();
            }
        }

        Product result = new Product();
View Full Code Here

Examples of cc.redberry.core.tensor.Integral.vars()

    }

    @Override
    public IndexMappingProvider create(IndexMappingProvider opu, Tensor from, Tensor to, boolean allowDiffStates) {
        final Integral intFrom = (Integral) from, intTo = (Integral) to;
        final SimpleTensor[] varsFrom = intFrom.vars(), varsTo = intTo.vars();
        if (varsFrom.length != varsTo.length)
            return IndexMappingProvider.Util.EMPTY_PROVIDER;
        Arrays.sort(varsFrom); //TODO change to quick Sort
        Arrays.sort(varsTo); //TODO change to quick Sort
        int i;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.binding.Binding.vars()

        if (this.varMapping == null)
            return b;

        // Apply remapping
        BindingMap binding = BindingFactory.create();
        Iterator<Var> vs = b.vars();
        while (vs.hasNext()) {
            Var v = vs.next();
            Node value = b.get(v);

            // Only remap non-null variables for which there is a mapping
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.binding.Binding.vars()

    ResultSet aResults = qe.execSelect();

    // you should be able to iterate over the results w/o an NPE
    while( aResults.hasNext() ) {
      Binding aBinding = aResults.nextBinding();
      Iterator<?> aVarIter = aBinding.vars();

      while( aVarIter.hasNext() ) {
        Var aVar = (Var) aVarIter.next();
        aBinding.get( aVar );
      }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.binding.Binding.vars()

    // in this case, since the query var that was undefined was the only thing in the projection,
    // you shouldn't get results with any bindings
    while( aResults.hasNext() ) {
      Binding aBinding = aResults.nextBinding();

      assertFalse( aBinding.vars().hasNext() );
    }
  }

  @Test
  public void testSizeEstimateNPE() {
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.binding.BindingInputStream.vars()

        List<Var> vars = new ArrayList<>() ;
        while(bin.hasNext())
        {
            Binding b = bin.next();
            bindings.add(b) ;
            for ( Var v : bin.vars() )
            {
                if ( ! vars.contains(v) )
                    vars.add(v) ;
            }
        }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.binding.BindingInputStream.vars()

        List<Var> vars = new ArrayList<Var>() ;
        while(bin.hasNext())
        {
            Binding b = bin.next();
            bindings.add(b) ;
            for ( Var v : bin.vars() )
            {
                if ( ! vars.contains(v) )
                    vars.add(v) ;
            }
        }
View Full Code Here

Examples of org.nutz.dao.sql.Sql.vars()

public class CustomizedSqlsTest extends DaoCase {

  @Test
  public void test_escape_varname_test() {
    Sql sql = Sqls.create("A_$xyz$_B");
    sql.vars().set("xyz", "X");
    assertEquals("A_X_B", sql.toString());
  }

  @Test
  public void test_query_by_limit() {
View Full Code Here

Examples of org.nutz.dao.sql.Sql.vars()

    ((NutDao) dao).setSqlManager(new FileSqlManager("org/nutz/dao/test/sqls/exec.sqls"));
    int platoonId = 23;
    try {
      pojos.initPlatoon(platoonId);
      Sql sql = dao.sqls().create("tank.insert");
      sql.vars().set("id", platoonId);
      sql.params().set("code", "T1").set("weight", 12);
      dao.execute(sql);

      sql = dao.sqls().create("tank.insert");
      sql.vars().set("id", platoonId);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.