cimforreduceloss/testHasttable/elementreduction.h

23 lines
546 B
C++

#ifndef ELEMENTREDUCTION_H
#define ELEMENTREDUCTION_H
#include <QList>
#include <QHash>
#include <QString>
#include <QVector>
#include "element/commontype.h"
//把电阻等于0的元件都去掉
class ElementReduction
{
public:
explicit ElementReduction(const QList<BranchStruc*>& branchList);
void doIt();
~ElementReduction();
private:
void visit(BranchStruc* branch, QHash<QString, QVector<BranchStruc *> > &linkage);
const QList<BranchStruc*>& branchList;
QHash<QString,char> visited;
};
#endif // ELEMENTREDUCTION_H