/[ascend]/trunk/pygtk/interface/incidencematrix.cpp
ViewVC logotype

Diff of /trunk/pygtk/interface/incidencematrix.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 234 by johnpye, Sun Jan 29 17:15:47 2006 UTC revision 237 by johnpye, Mon Jan 30 06:10:26 2006 UTC
# Line 4  Line 4 
4  #include <iostream>  #include <iostream>
5  using namespace std;  using namespace std;
6    
7    #include "variable.h"
8    
9  IncidencePoint::IncidencePoint(const int&row, const int &col, const IncidencePointType &type) : row(row), col(col), type(type){  IncidencePoint::IncidencePoint(const int&row, const int &col, const IncidencePointType &type) : row(row), col(col), type(type){
10      // constructor, IncidencePoint      // constructor, IncidencePoint
11  }  }
# Line 99  IncidenceMatrix::getIncidenceData(){ Line 101  IncidenceMatrix::getIncidenceData(){
101      }      }
102      return data;      return data;
103  }  }
104    
105    const Variable
106    IncidenceMatrix::getVariable(const int &col) const{
107        if(!is_built)throw runtime_error("Not built");
108        if(col < 0 || col >= getNumCols())throw runtime_error("Column out of range");
109        int vindex = i.pc2v[col];
110        struct var_variable *var = i.vlist[vindex];
111    
112        return Variable(&sim, var);
113    }
114    
115    

Legend:
Removed from v.234  
changed lines
  Added in v.237

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22