Skip to content

Commit e3a6853

Browse files
authored
update: remove static method tags
1 parent 5eaa9f9 commit e3a6853

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

hypervectors.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ def polarize(self):
9898
# TODO: docstrings
9999
# TODO: non-integer support
100100
# TODO: implement custom increment parameter (e.g., the value range is from 0-256 but in increments of 0.5)
101-
@staticmethod
102101
def gen_L_HVs(hv_size: Optional[int]=256, value_range: Optional[Tuple[int, int]]=None):
103102
if value_range == None:
104103
value_range = (0, hv_size)
@@ -136,19 +135,16 @@ def gen_L_HVs(hv_size: Optional[int]=256, value_range: Optional[Tuple[int, int]]
136135
return L_HVs
137136

138137
# performs element-wise addition on two Hypervectors and returns the resulting Hypervector
139-
@staticmethod
140138
def add(hv1, hv2):
141139
res_tensor = tf.add(hv1.tensor, hv2.tensor)
142140
return Hypervector(tensor=res_tensor)
143141

144142
# performs element-wise mulitplication on two Hypervectors and returns the resulting Hypervector
145-
@staticmethod
146143
def multiply(hv1, hv2):
147144
res_tensor = tf.multiply(hv1.tensor, hv2.tensor)
148145
return Hypervector(tensor=res_tensor)
149146

150147
# returns [-1, 1], with 0 denoting complete orthogonality
151-
@staticmethod
152148
def cos_similarity(hv1, hv2) -> float:
153149
'''
154150
Computes the cosine similarity between two Hypervectors.

0 commit comments

Comments
 (0)