Skip to content

Commit c5cb7b3

Browse files
Fix regression test
Dead code removal.
1 parent 6034bf1 commit c5cb7b3

File tree

6 files changed

+4
-53
lines changed

6 files changed

+4
-53
lines changed

engine/variableValue.cc

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -190,53 +190,6 @@ namespace minsky
190190
throw error("invalid access of variable value reference: %s",name.c_str());
191191
}
192192

193-
// namespace
194-
// {
195-
// vector<unsigned> dimsOf(const std::string& expression)
196-
// {
197-
// // unpack args
198-
// const char* x=expression.c_str()+1;
199-
// char* e;
200-
// vector<unsigned> dims;
201-
// for (;;)
202-
// {
203-
// auto tmp=strtol(x,&e,10);
204-
// if (tmp>0 && e>x && *e)
205-
// {
206-
// x=e+1;
207-
// dims.push_back(tmp);
208-
// }
209-
// else
210-
// break;
211-
// }
212-
// return dims;
213-
// }
214-
// }
215-
216-
// size_t VariableValue::size() const
217-
// {
218-
// if (init().empty()) return ITensor::size();
219-
// const FlowCoef fc(init());
220-
// if (trimWS(fc.name).empty()) return 1;
221-
// // special generator functions
222-
// auto p=fc.name.find('(');
223-
// if (p!=string::npos)
224-
// {
225-
// size_t sz=1;
226-
// for (auto i: dimsOf(fc.name.substr(p))) sz*=i;
227-
// return sz;
228-
// }
229-
// // go one dereference, then give up
230-
// auto valueId=minsky::valueId(m_scope.lock(), fc.name);
231-
// auto vv=cminsky().variableValues.find(valueId);
232-
// if (vv==minsky().variableValues.end())
233-
// throw error("Unknown variable %s in initialisation of %s",fc.name.c_str(), name.c_str());
234-
// const FlowCoef refInit(vv->second->init());
235-
// if (refInit.name.empty()) return 1;
236-
// if (refInit.name.find('(')!=string::npos) return vv->second->size();
237-
// throw error("Initialisation string references variable %s which references another variable %s",fc.name.c_str(),refInit.name.c_str());
238-
// }
239-
240193
const std::string& VariableValue::init(const std::string& x) {
241194
m_init=x;
242195
auto tensorInit=cminsky().variableValues.initValue(*this);

engine/variableValue.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ namespace minsky
151151
return m_hypercube;
152152
}
153153

154-
//size_t size() const override;
155-
156154
const Hypercube& hypercube(const Hypercube& hc) override
157155
{hypercube_(hc); return m_hypercube;}
158156
const Hypercube& hypercube(Hypercube&& hc) override

test/generatorExemplars/eye.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""gen"""
22
"RavelHypercube=[{\"dimension\":{\"type\":\"value\",\"units\":\"\"},\"name\":\"0\"},{\"dimension\":{\"type\":\"value\",\"units\":\"\"},\"name\":\"1\"}]"
3-
"0","1",value$
3+
0,1,value$
44
"0.000000","0.000000",1
55
"1.000000","0.000000",0
66
"2.000000","0.000000",0

test/generatorExemplars/iota.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""gen"""
22
"RavelHypercube=[{\"dimension\":{\"type\":\"value\",\"units\":\"\"},\"name\":\"0\"},{\"dimension\":{\"type\":\"value\",\"units\":\"\"},\"name\":\"1\"}]"
3-
"0","1",value$
3+
0,1,value$
44
"0.000000","0.000000",0
55
"1.000000","0.000000",1
66
"2.000000","0.000000",2

test/generatorExemplars/one.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""gen"""
22
"RavelHypercube=[{\"dimension\":{\"type\":\"value\",\"units\":\"\"},\"name\":\"0\"},{\"dimension\":{\"type\":\"value\",\"units\":\"\"},\"name\":\"1\"}]"
3-
"0","1",value$
3+
0,1,value$
44
"0.000000","0.000000",1
55
"1.000000","0.000000",1
66
"2.000000","0.000000",1

test/generatorExemplars/zero.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""gen"""
22
"RavelHypercube=[{\"dimension\":{\"type\":\"value\",\"units\":\"\"},\"name\":\"0\"},{\"dimension\":{\"type\":\"value\",\"units\":\"\"},\"name\":\"1\"}]"
3-
"0","1",value$
3+
0,1,value$
44
"0.000000","0.000000",0
55
"1.000000","0.000000",0
66
"2.000000","0.000000",0

0 commit comments

Comments
 (0)