コード例 #1
0
void Circuit_Handler::calc_X_Cols(){
        x_Rows = 0;
        Intersection *tempi;
        for (vector<Intersection *>::iterator it = intersections.begin() ; it != intersections.end(); ++it){
                        tempi = *it;
                        x_Cols += tempi->calc_X().cols();
        }
}
コード例 #2
0
MatrixXcf Circuit_Handler::calc_X(){
	int startrow = 0;
	int startcol = 0;
	MatrixXcf tempM;

	MatrixXcf X(num_of_nodes,num_of_nodes);
	X.setZero();
	Intersection *tempi;
	for (vector<Intersection *>::iterator it = intersections.begin() ; it != intersections.end(); ++it){
                        tempi = *it;
			tempM = tempi->calc_X();	
			X.block(startrow,startcol,tempM.rows(),tempM.cols()) = tempM;
			startrow += tempM.rows();
			startcol += tempM.cols();
        }

	return X;
}