// AllFeatures returns a config that enables all features.
324030
func AllFeatures() *Config {
	return &Config{
		RetainedMessages:     true,
		StoredPackets:        true,
		StoredSubscriptions:  true,
		OfflineSubscriptions: true,
		Authentication:       true,
		UniqueClientIDs:      true,
		RootSlashDistinction: true,
	}
}
947858
func (s *StartDeviceSyncInput) SetFeatures(v []*string) *StartDeviceSyncInput {
	s.Features = v
	return s
}
187836
func NewFeature(d int) *vision.Feature {
	return &vision.Feature{Type: DetectionType(d)}
}
1331537
func NewFeature(geom Geometry, properties map[string]interface{},
	id interface{}) *Feature {
	return &Feature{Type: "Feature",
		Geometry:   geom,
		Properties: properties,
		Id:         id}
}
507266
func getFeatures(c *configuration, dict *corpus.Corpus) []int {
	// logf("CONFIG: %v", c)
	wordFeats := make([]int, 0)
	posFeats := make([]lingo.POSTag, 0)
	labelFeats := make([]lingo.DependencyType, 0)
	unknownID, _ := dict.Id("-UNKNOWN-")

	for j := 2; j >= 0; j-- {
		index := c.stackValue(j)
		mor := c.annotation(index)

		if wordID, ok := dict.Id(mor.Value); ok {
			wordFeats = append(wordFeats, wordID)
		} else {
			wordFeats = append(wordFeats, unknownID)
		}
		posFeats = append(posFeats, mor.POSTag)
	}

	// logf("wordFeats: %v", wordFeats)

	for j := 0; j <= 2; j++ {
		index := c.bufferValue(j)
		mor := c.annotation(index)
		// logf("Want: %v Index: %d. Morpheme: %v", j, index, mor)

		if wordID, ok := dict.Id(mor.Value); ok {
			wordFeats = append(wordFeats, wordID)
		} else {
			wordFeats = append(wordFeats, unknownID)
		}
		posFeats = append(posFeats, mor.POSTag)
	}
	// logf("wordFeats: %v", wordFeats)

	for j := 0; j <= 1; j++ {
		k := c.stackValue(j)

		index := c.lc(k, 1)
		mor := c.annotation(index)
		if wordID, ok := dict.Id(mor.Value); ok {
			wordFeats = append(wordFeats, wordID)
		} else {
			wordFeats = append(wordFeats, unknownID)
		}
		posFeats = append(posFeats, mor.POSTag)
		labelFeats = append(labelFeats, c.label(index))

		index = c.rc(k, 1)
		mor = c.annotation(index)
		if wordID, ok := dict.Id(mor.Value); ok {
			wordFeats = append(wordFeats, wordID)
		} else {
			wordFeats = append(wordFeats, unknownID)
		}
		posFeats = append(posFeats, mor.POSTag)
		labelFeats = append(labelFeats, c.label(index))

		index = c.lc(k, 2)
		mor = c.annotation(index)
		if wordID, ok := dict.Id(mor.Value); ok {
			wordFeats = append(wordFeats, wordID)
		} else {
			wordFeats = append(wordFeats, unknownID)
		}
		posFeats = append(posFeats, mor.POSTag)
		labelFeats = append(labelFeats, c.label(index))

		index = c.rc(k, 2)
		mor = c.annotation(index)
		if wordID, ok := dict.Id(mor.Value); ok {
			wordFeats = append(wordFeats, wordID)
		} else {
			wordFeats = append(wordFeats, unknownID)
		}
		posFeats = append(posFeats, mor.POSTag)
		labelFeats = append(labelFeats, c.label(index))

		leftChild := c.lc(k, 1)
		index = c.lc(leftChild, 1)
		mor = c.annotation(index)
		if wordID, ok := dict.Id(mor.Value); ok {
			wordFeats = append(wordFeats, wordID)
		} else {
			wordFeats = append(wordFeats, unknownID)
		}
		posFeats = append(posFeats, mor.POSTag)
		labelFeats = append(labelFeats, c.label(index))

		rightChild := c.rc(k, 1)
		index = c.rc(rightChild, 1)
		mor = c.annotation(index)
		if wordID, ok := dict.Id(mor.Value); ok {
			wordFeats = append(wordFeats, wordID)
		} else {
			wordFeats = append(wordFeats, unknownID)
		}
		posFeats = append(posFeats, mor.POSTag)
		labelFeats = append(labelFeats, c.label(index))
	}

	// the embedding matrix is arranged thus:
	/*
		POSTag0 0, 1, ... 50
		POSTag1
		...
		MAXTAG-1
		DepType0
		DepType1
		...
		MAXDEPTYPE-1
		WordID0
		...
		WordIDN
	*/

	features := make([]int, MAXFEATURE)

	for i, w := range wordFeats {
		features[i] = w + wordFeatsStartAt
	}
	for i, t := range posFeats {
		features[i+POS_OFFSET] = int(t)
	}
	for i, l := range labelFeats {
		features[i+DEP_OFFSET] = int(l) + labelFeatsStartAt
	}

	return features
}
1128442
func printFeature(client pb.RouteGuideClient, point *pb.Point) {
	log.Printf("Getting feature for point (%d, %d)", point.Latitude, point.Longitude)
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
	defer cancel()
	feature, err := client.GetFeature(ctx, point)
	if err != nil {
		log.Fatalf("%v.GetFeatures(_) = _, %v: ", client, err)
	}
	log.Println(feature)
}
1347071
func NewFeature(f []byte) feature {
	h := fnv.New64()
	h.Write(f)
	return feature{h.Sum64(), 1}
}
365836
func (ls Layers) ToFeatureCollections() map[string]*geojson.FeatureCollection {
	result := make(map[string]*geojson.FeatureCollection, len(ls))
	for _, l := range ls {
		result[l.Name] = &geojson.FeatureCollection{
			Features: l.Features,
		}
	}

	return result
}
1149373
func (s *routeGuideServer) GetFeature(ctx context.Context, point *pb.Point) (*pb.Feature, error) {
	for _, feature := range s.savedFeatures {
		if proto.Equal(feature.Location, point) {
			return feature, nil
		}
	}
	// No feature was found, return an unnamed feature
	return &pb.Feature{Location: point}, nil
}
1209018
func (s *CreateOrganizationInput) SetFeatureSet(v string) *CreateOrganizationInput {
	s.FeatureSet = &v
	return s
}
158763
func NewAlphaFeatureGate(features []string) *AlphaFeatureGate {
	featureMap := make(map[string]bool)
	for _, name := range features {
		featureMap[name] = true
	}
	return &AlphaFeatureGate{featureMap}
}
15135
func (fv *FeatureVector) UnknownRequiredFeatures() []FeatureBit {
	var unknown []FeatureBit
	for feature := range fv.features {
		if feature%2 == 0 && !fv.IsKnown(feature) {
			unknown = append(unknown, feature)
		}
	}
	return unknown
}
1092110
func (r Software_Description) GetFeatures() (resp []datatypes.Software_Description_Feature, err error) {
	err = r.Session.DoRequest("SoftLayer_Software_Description", "getFeatures", nil, &r.Options, &resp)
	return
}
513114
func (s *ListOfferingsInput) SetSpecialFeature(v string) *ListOfferingsInput {
	s.SpecialFeature = &v
	return s
}
1222431
func (s *Service) OrganizationFeatureList(ctx context.Context, organizationIdentity string, lr *ListRange) (OrganizationFeatureListResult, error) {
	var organizationFeature OrganizationFeatureListResult
	return organizationFeature, s.Get(ctx, &organizationFeature, fmt.Sprintf("/organizations/%v/features", organizationIdentity), nil, lr)
}
1309974
func (c *Client) AppFeatureInfo(appIdentity string, appFeatureIdentity string) (*AppFeature, error) {
	var appFeature AppFeature
	return &appFeature, c.Get(&appFeature, "/apps/"+appIdentity+"/features/"+appFeatureIdentity)
}
9804
func (s *Service) AppFeatureList(ctx context.Context, appIdentity string, lr *ListRange) (AppFeatureListResult, error) {
	var appFeature AppFeatureListResult
	return appFeature, s.Get(ctx, &appFeature, fmt.Sprintf("/apps/%v/features", appIdentity), nil, lr)
}