Compare View

switch
from
...
to
 
Commits (4)
stim/biomodels/centerline.h
... ... @@ -330,8 +330,10 @@ public:
330 330 #endif
331 331 }
332 332 else {
333   - auto smallest = std::min_element(dist.begin(), dist.end());
334   - auto i = std::distance(dist.begin(), smallest); // find the index of min-distance in distance list
  333 + // auto smallest = std::min_element(dist.begin(), dist.end());
  334 + unsigned int smallest = std::min_element(dist.begin(), dist.end());
  335 + // auto i = std::distance(dist.begin(), smallest); // find the index of min-distance in distance list
  336 + unsigned int i = std::distance(dist.begin(), smallest); // find the index of min-distance in distance list
335 337  
336 338 // stitch position in c1 and c2
337 339 int id1 = index[i];
... ...
stim/biomodels/network.h
... ... @@ -599,7 +599,7 @@ public:
599 599 int dims[2]; ///number of vertex, number of edges
600 600 readHeader(filename, &dims[0]); //read header
601 601 std::ifstream file;
602   - file.open(filename, std::ios::in | std::ios::binary); ///skip header information.
  602 + file.open(filename.c_str(), std::ios::in | std::ios::binary); ///skip header information.
603 603 file.seekg(14+58+4+4, file.beg);
604 604 vertex v;
605 605 for(int i = 0; i < dims[0]; i++) ///for every vertex, read vertex, add to network.
... ... @@ -626,7 +626,7 @@ public:
626 626 {
627 627 writeHeader(filename);
628 628 std::ofstream file;
629   - file.open(filename, std::ios::out | std::ios::binary | std::ios::app); ///since we have written the header we are not appending.
  629 + file.open(filename.c_str(), std::ios::out | std::ios::binary | std::ios::app); ///since we have written the header we are not appending.
630 630 for(int i = 0; i < V.size(); i++) ///look through the Vertices and write each one.
631 631 {
632 632 // std::cout << i << " " << V[i].str() << std::endl;
... ... @@ -650,7 +650,7 @@ public:
650 650 int hNumVertices = V.size(); ///int byte header storing the number of vertices in the file
651 651 int hNumEdges = E.size(); ///int byte header storing the number of edges.
652 652 std::ofstream file;
653   - file.open(filename, std::ios::out | std::ios::binary);
  653 + file.open(filename.c_str(), std::ios::out | std::ios::binary);
654 654 std::cout << hNumVertices << " " << hNumEdges << std::endl;
655 655 file.write(reinterpret_cast<const char*>(&magicString.c_str()[0]), 14); //write the file id
656 656 file.write(reinterpret_cast<const char*>(&desc.c_str()[0]), 58); //write the description
... ... @@ -670,7 +670,7 @@ public:
670 670 int hNumVertices; ///#vert
671 671 int hNumEdges; ///#edges
672 672 std::ifstream file; ////create stream
673   - file.open(filename, std::ios::in | std::ios::binary);
  673 + file.open(filename.c_str(), std::ios::in | std::ios::binary);
674 674 file.read(reinterpret_cast<char*>(&magicString[0]), 14); ///read the file id.
675 675 file.read(reinterpret_cast<char*>(&desc[0]), 58); ///read the description
676 676 file.read(reinterpret_cast<char*>(&hNumVertices), sizeof(int)); ///read the number of vertices
... ...