Commit e2a6d232 authored by Michael Wimmer's avatar Michael Wimmer Committed by Christoph Groth
Browse files

add comment to cond() (why it works)

parent d524f0fd
......@@ -148,6 +148,11 @@ class SMatrix(object):
def cond(self):
"""Calculate conductance from a suitable block of the SMatrix."""
# Note: Here the conductance is calculated using a norm (the
# Frobenius-norm, to be precise) In fact, ||A||_F^2=Tr(A A^H), so it's
# correct.
if self.r != None:
cond = self.r.shape[0] - np.linalg.norm(self.r)**2
elif self.t != None:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment