Package PyML :: Package containers :: Package ext :: Module csparsefeaturevector
[frames] | no frames]

Source Code for Module PyML.containers.ext.csparsefeaturevector

  1  # This file was automatically generated by SWIG (http://www.swig.org). 
  2  # Version 1.3.31 
  3  # 
  4  # Don't modify this file, modify the SWIG interface instead. 
  5  # This file is compatible with both classic and new-style classes. 
  6   
  7  import _csparsefeaturevector 
  8  import new 
  9  new_instancemethod = new.instancemethod 
 10  try: 
 11      _swig_property = property 
 12  except NameError: 
 13      pass # Python < 2.2 doesn't have 'property'. 
14 -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
15 if (name == "thisown"): return self.this.own(value) 16 if (name == "this"): 17 if type(value).__name__ == 'PySwigObject': 18 self.__dict__[name] = value 19 return 20 method = class_type.__swig_setmethods__.get(name,None) 21 if method: return method(self,value) 22 if (not static) or hasattr(self,name): 23 self.__dict__[name] = value 24 else: 25 raise AttributeError("You cannot add attributes to %s" % self)
26
27 -def _swig_setattr(self,class_type,name,value):
28 return _swig_setattr_nondynamic(self,class_type,name,value,0)
29
30 -def _swig_getattr(self,class_type,name):
31 if (name == "thisown"): return self.this.own() 32 method = class_type.__swig_getmethods__.get(name,None) 33 if method: return method(self) 34 raise AttributeError,name
35
36 -def _swig_repr(self):
37 try: strthis = "proxy of " + self.this.__repr__() 38 except: strthis = "" 39 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
40 41 import types 42 try: 43 _object = types.ObjectType 44 _newclass = 1 45 except AttributeError:
46 - class _object : pass
47 _newclass = 0 48 del types 49 50
51 -class Feature(_object):
52 __swig_setmethods__ = {} 53 __setattr__ = lambda self, name, value: _swig_setattr(self, Feature, name, value) 54 __swig_getmethods__ = {} 55 __getattr__ = lambda self, name: _swig_getattr(self, Feature, name) 56 __repr__ = _swig_repr 57 __swig_setmethods__["index"] = _csparsefeaturevector.Feature_index_set 58 __swig_getmethods__["index"] = _csparsefeaturevector.Feature_index_get 59 if _newclass:index = _swig_property(_csparsefeaturevector.Feature_index_get, _csparsefeaturevector.Feature_index_set) 60 __swig_setmethods__["value"] = _csparsefeaturevector.Feature_value_set 61 __swig_getmethods__["value"] = _csparsefeaturevector.Feature_value_get 62 if _newclass:value = _swig_property(_csparsefeaturevector.Feature_value_get, _csparsefeaturevector.Feature_value_set)
63 - def __init__(self, *args):
64 this = _csparsefeaturevector.new_Feature(*args) 65 try: self.this.append(this) 66 except: self.this = this
67 - def compare(*args): return _csparsefeaturevector.Feature_compare(*args)
68 __swig_destroy__ = _csparsefeaturevector.delete_Feature 69 __del__ = lambda self : None; 70 Feature_swigregister = _csparsefeaturevector.Feature_swigregister 71 Feature_swigregister(Feature) 72
73 -class SparseFeatureVector(_object):
74 __swig_setmethods__ = {} 75 __setattr__ = lambda self, name, value: _swig_setattr(self, SparseFeatureVector, name, value) 76 __swig_getmethods__ = {} 77 __getattr__ = lambda self, name: _swig_getattr(self, SparseFeatureVector, name) 78 __repr__ = _swig_repr 79 __swig_setmethods__["features"] = _csparsefeaturevector.SparseFeatureVector_features_set 80 __swig_getmethods__["features"] = _csparsefeaturevector.SparseFeatureVector_features_get 81 if _newclass:features = _swig_property(_csparsefeaturevector.SparseFeatureVector_features_get, _csparsefeaturevector.SparseFeatureVector_features_set)
82 - def __init__(self, *args):
83 this = _csparsefeaturevector.new_SparseFeatureVector(*args) 84 try: self.this.append(this) 85 except: self.this = this
86 - def initialize(*args): return _csparsefeaturevector.SparseFeatureVector_initialize(*args)
87 - def get(*args): return _csparsefeaturevector.SparseFeatureVector_get(*args)
88 - def add(*args): return _csparsefeaturevector.SparseFeatureVector_add(*args)
89 - def printData(*args): return _csparsefeaturevector.SparseFeatureVector_printData(*args)
90 - def commonFeatures(*args): return _csparsefeaturevector.SparseFeatureVector_commonFeatures(*args)
91 - def scale(*args): return _csparsefeaturevector.SparseFeatureVector_scale(*args)
92 - def norm(*args): return _csparsefeaturevector.SparseFeatureVector_norm(*args)
93 - def dotProduct(*args): return _csparsefeaturevector.SparseFeatureVector_dotProduct(*args)
94 - def size(*args): return _csparsefeaturevector.SparseFeatureVector_size(*args)
95 __swig_destroy__ = _csparsefeaturevector.delete_SparseFeatureVector 96 __del__ = lambda self : None; 97 SparseFeatureVector_swigregister = _csparsefeaturevector.SparseFeatureVector_swigregister 98 SparseFeatureVector_swigregister(SparseFeatureVector) 99