Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

Resistance.cpp File Reference

Resistance/energy calculation based very closely on Six's circuit implementation. More...

#include <cmath>
#include "Hex.hpp"
#include "BitsetIterator.hpp"
#include "VCSet.hpp"
#include "Resistance.hpp"
#include "Pattern.hpp"
#include "HashedPatternSet.hpp"
#include "lssolve.h"

Go to the source code of this file.


Detailed Description

Resistance/energy calculation based very closely on Six's circuit implementation.

We use the same open source code to solve the linear system that Six uses. We actually tried linking with two different external linear algebra libraries (GNU Scientific library and boost::numeric::ublas) but both fail in some instances that our current code handles without complaint.

These instances seem to include a linear dependence among the rows of our G matrix. In this simplest case, this can happen if one group's set of connections is a superset of another group's. We haven't been able to find a way around this, as any fix seems more expensive than worthwhile.

We also hoped these external libraries would be faster; again, this does not appear to be the case.

It is possible that a more powerful library like LAPACK would address both of these issues, but the hassle of adding this external dependency to benzene probably outweighs the gain.

Definition in file Resistance.cpp.


6 Jan 2011 Doxygen 1.6.3