MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / eulidLength

Method eulidLength

linear_algebra_python/src/lib.py:83–90  ·  view source on GitHub ↗

returns the eulidean length of the vector

(self)

Source from the content-addressed store, hash-verified

81 """
82 return len(self.__components)
83 def eulidLength(self):
84 """
85 returns the eulidean length of the vector
86 """
87 summe = 0
88 for c in self.__components:
89 summe += c**2
90 return math.sqrt(summe)
91 def __add__(self,other):
92 """
93 input: other vector

Callers 1

test_euclidLengthMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_euclidLengthMethod · 0.76