Returns a feature set combining all the features from {@code this} and {@code newFeatures}.
963985
@VisibleForTesting
  public FeatureSet with(Feature... newFeatures) {
    return new FeatureSet(union(features, ImmutableSet.copyOf(newFeatures)));
  }
935504
def runGetFeatureSet(self, id_):
        
        compoundId = datamodel.FeatureSetCompoundId.parse(id_)
        dataset = self.getDataRepository().getDataset(compoundId.dataset_id)
        featureSet = dataset.getFeatureSet(id_)
        return self.runGetRequest(featureSet)
1317319
public static FeatureCollection fromFeature(@NonNull Feature feature) {
    List<Feature> featureList = Arrays.asList(feature);
    return new FeatureCollection(TYPE, null, featureList);
  }
555437
public Feature[] getSelectedFeatures() {
		Collection<org.geomajas.gwt.client.map.feature.Feature> selection = getLayer().getSelectedFeatureValues();
		Feature[] features = new Feature[selection.size()];
		int count = 0;
		for (org.geomajas.gwt.client.map.feature.Feature feature : selection) {
			features[count] = new FeatureImpl(feature.toDto(), this);
			count++;
		}
		return features;
	}
866558
public synchronized ClientBuilder newBuilder(String clientName, Collection<JaxRsFeatureGroup> featureGroupsIn) {
        final JaxRsClientConfig jaxRsConfig = configForClient(clientName);
        return newBuilder(clientName, jaxRsConfig, featureGroupsIn);
    }
1358066
public static FeatureVector toFeatures(Block map)
    {
        Map<Integer, Double> features = new HashMap<>();

        if (map != null) {
            for (int position = 0; position < map.getPositionCount(); position += 2) {
                features.put((int) BIGINT.getLong(map, position), DOUBLE.getDouble(map, position + 1));
            }
        }
        return new FeatureVector(features);
    }
1092279
public void updateFeatures() {
	for (int i = 0; i < feaGen.features.size(); i++) {
	    Feature f = (Feature)feaGen.features.get(i);
	    f.wgt = lambda[f.idx];    
	}
    }
185058
protected SimpleFeature asFeature(Object possibleFeature) throws LayerException {
		if (possibleFeature instanceof SimpleFeature) {
			return (SimpleFeature) possibleFeature;
		} else {
			throw new LayerException(ExceptionCode.INVALID_FEATURE_OBJECT, possibleFeature.getClass().getName());
		}
	}
43358
public ArrayList<String> getFeatures() {
		if (isFinalState())
			return null;
		ArrayList<String> featurelist = new ArrayList<String>();

		int rightFocus = leftFocus + 1;

//		ISparseVector vec = new HashSparseVector();
		//所有的联合feature
		featurelist.add(combinedFeature("+0+1", POS, new int[]{0, 1}));
		featurelist.add(combinedFeature("-1+0+1", POS, new int[]{-1, 0, 1}));
		featurelist.add(combinedFeature("+0+1+2", POS, new int[]{0, 1, 2}));
		featurelist.add(combinedFeature("+1+2+3", POS, new int[]{1, 2, 3}));
		featurelist.add(combinedFeature("-2+3+4", POS, new int[]{2, 3, 4}));
		featurelist.add(combinedFeature("+0+1", LEX, new int[]{0, 1}));
		featurelist.add(combinedFeature("-1+0+1", LEX, new int[]{-1, 0, 1}));
		featurelist.add(combinedFeature("+0+1+2", LEX, new int[]{0, 1, 2}));

		// 设定上下文窗口大小
		int l = 2;
		int r = 4;
		for (int i = 0; i <= l; i++) {
			// 特征前缀
			String posFeature = "-" + String.valueOf(i) + POS;
			String lexFeature = "-" + String.valueOf(i) + LEX;

			String lcLexFeature = "-" + String.valueOf(i)
					+ CH_L_LEX;
			String lcPosFeature = "-" + String.valueOf(i)
					+ CH_L_POS;
			String rcLexFeature = "-" + String.valueOf(i)
					+ CH_R_LEX;
			String rcPosFeature = "-" + String.valueOf(i)
					+ CH_R_POS;
			String lcDepFeature = "-" + String.valueOf(i)
					+ CH_L_DEP;			
			String rcDepFeature = "-" + String.valueOf(i)
					+ CH_R_DEP;

			if (leftFocus - i < 0) {
				featurelist.add(lexFeature + START + String.valueOf(i - leftFocus));
				featurelist.add(posFeature + START + String.valueOf(i - leftFocus));
			} else {
				featurelist.add(lexFeature + sent.words[trees.get(leftFocus - i).id]);
				featurelist.add(posFeature + sent.tags[trees.get(leftFocus - i).id]);

				if (trees.get(leftFocus - i).leftChilds.size() != 0) {
					for (int j = 0; j < trees.get(leftFocus - i).leftChilds
							.size(); j++) {
						int leftChildIndex = trees.get(leftFocus - i).leftChilds
								.get(j).id;
						featurelist.add(lcLexFeature
								+ sent.words[leftChildIndex]);
						featurelist.add(lcPosFeature
								+ sent.tags[leftChildIndex]);
						featurelist.add(lcDepFeature
								+ sent.getDepClass(leftChildIndex));
					}
				}else{
					featurelist.add(lcLexFeature + NULL);
					featurelist.add(lcPosFeature + NULL);
				}

				if (trees.get(leftFocus - i).rightChilds.size() != 0) {
					for (int j = 0; j < trees.get(leftFocus - i).rightChilds
							.size(); j++) {
						int rightChildIndex = trees.get(leftFocus - i).rightChilds
								.get(j).id;
						featurelist.add(rcLexFeature
								+ sent.words[rightChildIndex]);
						featurelist.add(rcPosFeature
								+ sent.tags[rightChildIndex]);
						featurelist.add(rcDepFeature
								+ sent.getDepClass(rightChildIndex));
					}
				}else{
					featurelist.add(rcLexFeature + NULL);
					featurelist.add(rcPosFeature + NULL);
				}
			}
		}

		for (int i = 0; i <= r; i++) {
			String posFeature = "+" + String.valueOf(i) + POS;
			String lexFeature = "+" + String.valueOf(i) + LEX;

			String lcLexFeature = "+" + String.valueOf(i)
					+ CH_L_LEX;
			String rcLexFeature = "+" + String.valueOf(i)
					+ CH_R_LEX;
			String lcPosFeature = "+" + String.valueOf(i)
					+ CH_L_POS;			
			String rcPosFeature = "+" + String.valueOf(i)
					+ CH_R_POS;
			String lcDepFeature = "+" + String.valueOf(i)
					+ CH_L_DEP;			
			String rcDepFeature = "+" + String.valueOf(i)
					+ CH_R_DEP;

			if (rightFocus + i >= trees.size()) {
				featurelist.add(lexFeature+ END+ String.valueOf(rightFocus + i- trees.size() + 3));
				featurelist.add(posFeature+ END+ String.valueOf(rightFocus + i- trees.size() + 3));
			} else {
				featurelist.add(lexFeature+ sent.words[trees.get(rightFocus + i).id]);
				featurelist.add(posFeature+ sent.tags[trees.get(rightFocus + i).id]);

				if (trees.get(rightFocus + i).leftChilds.size() != 0) {
					for (int j = 0; j < trees.get(rightFocus + i).leftChilds
							.size(); j++) {
						int leftChildIndex = trees.get(rightFocus + i).leftChilds
								.get(j).id;
						featurelist.add(lcLexFeature+ sent.words[leftChildIndex]);
						featurelist.add(lcPosFeature+ sent.tags[leftChildIndex]);
						featurelist.add(lcDepFeature+ sent.getDepClass(leftChildIndex));
					}
				}else{
					featurelist.add(lcLexFeature + NULL);
					featurelist.add(lcPosFeature + NULL);
				}

				if (trees.get(rightFocus + i).rightChilds.size() != 0) {
					for (int j = 0; j < trees.get(rightFocus + i).rightChilds
							.size(); j++) {
						int rightChildIndex = trees.get(rightFocus + i).rightChilds
								.get(j).id;
						featurelist.add(rcLexFeature+ sent.words[rightChildIndex]);
						featurelist.add(rcPosFeature+ sent.tags[rightChildIndex]);
						featurelist.add(rcDepFeature+ sent.getDepClass(rightChildIndex));
					}
				}else{
					featurelist.add(rcLexFeature + NULL);
					featurelist.add(rcPosFeature + NULL);
				}
			}
		}
		
		
		return featurelist;
	}
993879
public SimpleFeatureCollection toFeatureCollection() {
        checkTinGeometries();
        SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();
        b.setName("triangle");
        b.setCRS(crs);

        DefaultFeatureCollection newCollection = new DefaultFeatureCollection();
        b.add("the_geom", Polygon.class);
        b.add("elev0", Double.class);
        b.add("elev1", Double.class);
        b.add("elev2", Double.class);
        SimpleFeatureType type = b.buildFeatureType();
        SimpleFeatureBuilder builder = new SimpleFeatureBuilder(type);
        for( Geometry g : tinGeometries ) {
            Coordinate[] coordinates = g.getCoordinates();

            Object[] values;
            int windingRule = GeometryUtilities.getTriangleWindingRule(coordinates[0], coordinates[1], coordinates[2]);
            if (windingRule > 0) {
                // need to reverse the triangle
                values = new Object[]{g, coordinates[0].z, coordinates[2].z, coordinates[1].z};
            } else {
                values = new Object[]{g, coordinates[0].z, coordinates[1].z, coordinates[2].z};
            }

            builder.addAll(values);
            SimpleFeature feature = builder.buildFeature(null);
            newCollection.add(feature);
        }
        return newCollection;
    }
1062164
public void addFeatures(List<Feature> features) {
		numFeatures += features.size();
		for (Feature feature : features) {
			featureListGrid.addFeature(feature);
		}
		if (sortFeatures) {
			featureListGrid.sort(sortFieldName, sortDirGWT);
		}
		
		if (exportCsvHandler instanceof ExportFeatureListToCsvHandler) {
			((ExportFeatureListToCsvHandler) exportCsvHandler).setFeatures(features);
		}
	}
173759
public Feature getFeature() {
		for (AttributeInfo info : layer.getLayerInfo().getFeatureInfo().getAttributes()) {
			featureForm.fromForm(info.getName(), feature.getAttributes().get(info.getName()));
		}
		return feature;
	}
817464
public List<Feature> getSortedFeatures() {
        ArrayList<Feature> result = new ArrayList<>(pcm.getConcreteFeatures());
        Collections.sort(result, new Comparator<Feature>() {
            @Override
            public int compare(Feature f1, Feature f2) {
                Integer fp1 = getFeaturePosition(f1);
                Integer fp2 = getFeaturePosition(f2);
                return fp1.compareTo(fp2);
            }
        });
        return result;
    }
789782
@SuppressWarnings("static-method")
	public void getImportedFeatures(List<Class<?>> features) {
		features.add(AtomicLongCastExtensions.class);
		features.add(AtomicIntegerCastExtensions.class);
		features.add(AtomicDoubleCastExtensions.class);
		features.add(BigIntegerCastExtensions.class);
		features.add(BigDecimalCastExtensions.class);
		features.add(NumberCastExtensions.class);
		features.add(PrimitiveByteCastExtensions.class);
		features.add(PrimitiveDoubleCastExtensions.class);
		features.add(PrimitiveFloatCastExtensions.class);
		features.add(PrimitiveIntCastExtensions.class);
		features.add(PrimitiveLongCastExtensions.class);
		features.add(PrimitiveShortCastExtensions.class);
	}
142300
public JSONReader withFeatures(int features)
    {
        if (_features == features) {
            return this;
        }
        return _with(features, _readerLocator, _treeCodec, _collectionBuilder, _mapBuilder);
    }
1066696
public CombinableConfig combine(Config... fallbackConfigs) {
        CombinableConfig newConfig = this;
        for (Config fallback : fallbackConfigs) {
            newConfig = new ConfigWithFallback(newConfig, fallback);
        }
        return newConfig;
    }
181221
def addFeatureSet(self, featureSet):
        
        id_ = featureSet.getId()
        self._featureSetIdMap[id_] = featureSet
        self._featureSetIds.append(id_)
        name = featureSet.getLocalId()
        self._featureSetNameMap[name] = featureSet