// RemoveClassAttribute removes a given Attribute (either before or
// after filtering) from the set of defined class Attributes.
12477
func (l *LazilyFilteredInstances) RemoveClassAttribute(cls Attribute) error {
	if l.unfilteredMap[cls] {
		l.classAttrs[cls] = false
		return nil
	}
	for _, a := range l.attrs {
		if a.Old.Equals(cls) || a.New.Equals(cls) {
			l.classAttrs[a.New] = false
			return nil
		}
	}
	return fmt.Errorf("Attribute %s could not be resolved", cls)
}
1181474
func (self *SimpleCookieMapper) RemoveCookie(w http.ResponseWriter) {
	cookie := &http.Cookie{
		Name:   self.CookieName(),
		Value:  "",
		Path:   "/",
		MaxAge: -1,
	}
	http.SetCookie(w, cookie)
}
819438
func (dp *Datapoint) RemoveProperty(key string) {
	if dp.Meta[tsProperty] != nil {
		delete(dp.GetProperties(), key)
		if len(dp.GetProperties()) == 0 {
			delete(dp.Meta, tsProperty)
		}
	}
}
606947
func (f *FakeDocker) RemoveImage(name string) error {
	f.RemoveImageName = name
	return f.RemoveImageError
}
447506
func (image *Image) Remove() error {
	var c_name *C.char = C.CString(image.name)
	defer C.free(unsafe.Pointer(c_name))
	return GetError(C.rbd_remove(C.rados_ioctx_t(image.ioctx.Pointer()), c_name))
}
1281202
func ExtractAttributeForDistinct(opts ...interface{}) *opt.AttributeForDistinctOption {
	for _, o := range opts {
		if v, ok := o.(*opt.AttributeForDistinctOption); ok {
			return v
		}
	}
	return nil
}
112857
func (v *InstancesView) AddClassAttribute(a Attribute) error {
	// Check that this Attribute is defined
	matched := false
	for _, r := range v.AllAttributes() {
		if r.Equals(a) {
			matched = true
		}
	}
	if !matched {
		return fmt.Errorf("Attribute has been filtered")
	}

	v.classAttrs[a] = true
	return nil
}
23813
func (e *Element) GetAttribute(name string) string {
	attr, err := e.GetAttributes()
	if err != nil {
		return ""
	}
	return attr[name]
}
1046202
func (f *FixedAttributeGroup) AddAttribute(a Attribute) error {
	f.attributes = append(f.attributes, a)
	return nil
}
1169900
func GetClassDistributionAfterThreshold(inst FixedDataGrid, at Attribute, val float64) map[string]map[string]int {
	ret := make(map[string]map[string]int)

	// Find the attribute we're decomposing on
	attrSpec, err := inst.GetAttribute(at)
	if err != nil {
		panic(fmt.Sprintf("Invalid attribute %s (%s)", at, err))
	}

	// Validate
	if _, ok := at.(*FloatAttribute); !ok {
		panic(fmt.Sprintf("Must be numeric!"))
	}

	_, rows := inst.Size()

	for i := 0; i < rows; i++ {
		splitVal := UnpackBytesToFloat(inst.Get(attrSpec, i)) > val
		splitVar := "0"
		if splitVal {
			splitVar = "1"
		}
		classVar := GetClass(inst, i)
		if _, ok := ret[splitVar]; !ok {
			ret[splitVar] = make(map[string]int)
			i--
			continue
		}
		ret[splitVar][classVar]++
	}

	return ret
}
913166
func (m *Mat64Instances) RemoveClassAttribute(a Attribute) error {
	as, err := m.GetAttribute(a)
	if err != nil {
		return err
	}

	m.classAttrs[as.position] = false
	return nil
}
1320619
func (s *DeviceFilter) SetAttribute(v string) *DeviceFilter {
	s.Attribute = &v
	return s
}
282128
func (m *Mat64Instances) AllClassAttributes() []Attribute {
	ret := make([]Attribute, 0)
	for i := range m.classAttrs {
		if m.classAttrs[i] {
			ret = append(ret, m.attributes[i])
		}
	}

	return ret
}
137884
func (s *SnapshotSortingEntity) SetAttribute(v string) *SnapshotSortingEntity {
	s.Attribute = &v
	return s
}
48782
func (c *Client) Delete(object Object) error {
	className, err := objectTypeName(object)
	if err != nil {
		return err
	}
	uri := fmt.Sprintf("/1/classes/%s/%s", className, object.ObjectID())
	resp, err := c.doSimple("DELETE", uri)
	defer resp.Body.Close()
	c.trace("Delete", uri)
	return err
}
159998
func (f *FingerprintResponse) RemoveAttribute(name string) {
	// initialize Attributes if it has not been already
	if f.Attributes == nil {
		f.Attributes = make(map[string]string, 0)
	}

	f.Attributes[name] = ""
}
1028421
func ExtractAttributesForFaceting(opts ...interface{}) *opt.AttributesForFacetingOption {
	for _, o := range opts {
		if v, ok := o.(*opt.AttributesForFacetingOption); ok {
			return v
		}
	}
	return nil
}