Examples of like()


Examples of org.apache.mahout.math.Vector.like()

      int size = Math.min(ejCol.size(), state.getBasisSize());
      for (int j = 0; j < size; j++) {
        double d = ejCol.get(j);
        Vector rowJ = state.getBasisVector(j);
        if(realEigen == null) {
          realEigen = rowJ.like();
        }
        realEigen.assign(rowJ, new PlusMult(d));
      }
      realEigen = realEigen.normalize();
      state.setRightSingularVector(row, realEigen);
View Full Code Here

Examples of org.apache.mahout.math.Vector.like()

  @Override
  public Model<VectorWritable>[] sampleFromPrior(int howMany) {
    Model<VectorWritable>[] result = new DistanceMeasureCluster[howMany];
    for (int i = 0; i < howMany; i++) {
      Vector prototype = getModelPrototype().get();
      result[i] = new DistanceMeasureCluster(prototype.like(), i, measure);
    }
    return result;
  }

  @Override
View Full Code Here

Examples of org.apache.mahout.math.Vector.like()

  @Override
  public Model<VectorWritable>[] sampleFromPrior(int howMany) {
    Model<VectorWritable>[] result = new NormalModel[howMany];
    for (int i = 0; i < howMany; i++) {
      Vector prototype = getModelPrototype().get();
      result[i] = new NormalModel(i, prototype.like(), 1);
    }
    return result;
  }
 
  @Override
View Full Code Here

Examples of org.apache.mahout.matrix.DenseVector.like()

  }

  public void testRmultinom1() {
    double[] b = { 0.4, 0.6 };
    Vector v = new DenseVector(b);
    Vector t = v.like();
    for (int i = 1; i <= 100; i++) {
      Vector multinom = UncommonDistributions.rMultinom(100, v);
      t = t.plus(multinom);
    }
    System.out.println("sum(rMultinom(" + 100 + ", [0.4, 0.6]))/100="
View Full Code Here

Examples of org.geotools.filter.FilterFactoryImplNamespaceAware.like()

        List<Filter> filterList = new ArrayList<Filter>();
        FilterFactory2 ff = new FilterFactoryImplNamespaceAware(
                ((MappingFeatureSource) featureSource).getMapping().getNamespaces());
        Expression property = ff
                .property("gsml:geologicHistory/gsml:GeologicEvent/gsml:eventEnvironment/gsml:CGI_TermValue/gsml:value");
        Filter filter = ff.like(property, "*mid-crustal*");

        filterList.add(filter);
        property = ff.property("gsml:purpose");
        filter = ff.like(property, "*ypical*");
        filterList.add(filter);
View Full Code Here

Examples of org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery.like()

    String jString = request.getParameter("_dt_json");
    DataTables dataTables = new DataTables(request);
    CriteriaQuery cq = new CriteriaQuery(TSUser.class, dataTables);
    String username = request.getParameter("userName");
    if (username != null) {
      cq.like("userName", username);
      cq.add();
    }
    DataTableReturn dataTableReturn = systemService.getDataTableReturn(cq, true);
    TagUtil.datatable(response, dataTableReturn, "id,userName,mobilePhone,TSDepart_departname");
  }
View Full Code Here

Examples of org.nuxeo.ecm.rating.api.LikeService.like()

        // Get user name
        String userName = ctx.getPrincipal().getName();
        if (likeService.hasUserLiked(userName, docToLike)) {
            likeService.dislike(userName, docToLike);
        } else {
            likeService.like(userName, docToLike);
        }
        return Response.ok(
                getView("bricks/document_like").arg("doc", docToLike)).header(
                "docRef", docRef).build();
    }
View Full Code Here

Examples of org.opengis.filter.FilterFactory.like()

        // greater than
        f = ff.greater(ff.property("PERSONS"), ff.literal(10000000));
        assertEquals(6, fs.getFeatures(f).size());
       
        // mix in a filter that cannot be encoded
        f = ff.and(f, ff.like(ff.property("STATE_NAME"), "C*"));
        assertEquals(1, fs.getFeatures(f).size());
    }
   
    public void testAttributesWritingSqlite() throws Exception {
        if (!ogrSupports("SQLite")) {
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.like()

            String singleChar = attrs.getValue( "singleChar" );
            String escape = attrs.getValue( "escape" );
            Literal pattern = (Literal) value[1].getValue();
           
         
            return factory.like(expr, (String) pattern.getValue(), wildCard, singleChar, escape);
                        }
          catch( ClassCastException expressionRequired ){
            throw new SAXException("Illegal filter for "+element, expressionRequired );
      }
          catch (IllegalFilterException e) {
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.