Commit d3e285a1 authored by Kirill Terekhov's avatar Kirill Terekhov

conform iterators to new visual studio

parent 12f57876
This diff is collapsed.
...@@ -169,8 +169,8 @@ namespace INMOST ...@@ -169,8 +169,8 @@ namespace INMOST
iterator & operator --() {cont_t::iterator::operator--(); return *this;} iterator & operator --() {cont_t::iterator::operator--(); return *this;}
iterator operator --(int) {iterator ret(*this); cont_t::iterator::operator--(); return ret;} iterator operator --(int) {iterator ret(*this); cont_t::iterator::operator--(); return ret;}
iterator & operator =(iterator const & other) {m_link = other.m_link; cont_t::iterator::operator=(static_cast<cont_t::iterator const &>(other)); return *this; } iterator & operator =(iterator const & other) {m_link = other.m_link; cont_t::iterator::operator=(static_cast<cont_t::iterator const &>(other)); return *this; }
HandleType & operator *() { return cont_t::iterator::operator *(); } HandleType & operator *() const { return cont_t::iterator::operator *(); }
StorageType operator->() { return StorageType(m_link,&cont_t::iterator::operator *()); } StorageType operator->() const { return StorageType(m_link,&cont_t::iterator::operator *()); }
}; };
class reverse_iterator : public cont_t::reverse_iterator class reverse_iterator : public cont_t::reverse_iterator
{ {
...@@ -186,8 +186,8 @@ namespace INMOST ...@@ -186,8 +186,8 @@ namespace INMOST
reverse_iterator & operator --() {cont_t::reverse_iterator::operator--(); return *this;} reverse_iterator & operator --() {cont_t::reverse_iterator::operator--(); return *this;}
reverse_iterator operator --(int) {reverse_iterator ret(*this); cont_t::reverse_iterator::operator--(); return ret;} reverse_iterator operator --(int) {reverse_iterator ret(*this); cont_t::reverse_iterator::operator--(); return ret;}
reverse_iterator & operator =(reverse_iterator const & other) {m_link = other.m_link; cont_t::reverse_iterator::operator=(static_cast<cont_t::reverse_iterator const &>(other)); return *this; } reverse_iterator & operator =(reverse_iterator const & other) {m_link = other.m_link; cont_t::reverse_iterator::operator=(static_cast<cont_t::reverse_iterator const &>(other)); return *this; }
HandleType & operator *() { return cont_t::reverse_iterator::operator *(); } HandleType & operator *() const { return cont_t::reverse_iterator::operator *(); }
StorageType operator->() { return StorageType(m_link,&cont_t::reverse_iterator::operator *()); } StorageType operator->() const { return StorageType(m_link,&cont_t::reverse_iterator::operator *()); }
}; };
class const_iterator : public cont_t::const_iterator class const_iterator : public cont_t::const_iterator
{ {
...@@ -201,8 +201,8 @@ namespace INMOST ...@@ -201,8 +201,8 @@ namespace INMOST
const_iterator & operator --() {cont_t::const_iterator::operator--(); return *this;} const_iterator & operator --() {cont_t::const_iterator::operator--(); return *this;}
const_iterator operator --(int) {const_iterator ret(*this); cont_t::const_iterator::operator--(); return ret;} const_iterator operator --(int) {const_iterator ret(*this); cont_t::const_iterator::operator--(); return ret;}
const_iterator & operator =(const_iterator const & other) {m_link = other.m_link; cont_t::const_iterator::operator=(static_cast<cont_t::const_iterator const &>(other)); return *this; } const_iterator & operator =(const_iterator const & other) {m_link = other.m_link; cont_t::const_iterator::operator=(static_cast<cont_t::const_iterator const &>(other)); return *this; }
const HandleType & operator *() { return cont_t::const_iterator::operator *(); } const HandleType & operator *() const { return cont_t::const_iterator::operator *(); }
StorageType operator->() { return StorageType(m_link,cont_t::const_iterator::operator *()); } StorageType operator->() const { return StorageType(m_link,cont_t::const_iterator::operator *()); }
}; };
class const_reverse_iterator : public cont_t::const_reverse_iterator class const_reverse_iterator : public cont_t::const_reverse_iterator
{ {
...@@ -216,8 +216,8 @@ namespace INMOST ...@@ -216,8 +216,8 @@ namespace INMOST
const_reverse_iterator & operator --() {cont_t::const_reverse_iterator::operator--(); return *this;} const_reverse_iterator & operator --() {cont_t::const_reverse_iterator::operator--(); return *this;}
const_reverse_iterator operator --(int) {const_reverse_iterator ret(*this); cont_t::const_reverse_iterator::operator--(); return ret;} const_reverse_iterator operator --(int) {const_reverse_iterator ret(*this); cont_t::const_reverse_iterator::operator--(); return ret;}
const_reverse_iterator & operator =(const_reverse_iterator const & other) { cont_t::const_reverse_iterator::operator=(static_cast<cont_t::const_reverse_iterator const &>(other)); return *this; } const_reverse_iterator & operator =(const_reverse_iterator const & other) { cont_t::const_reverse_iterator::operator=(static_cast<cont_t::const_reverse_iterator const &>(other)); return *this; }
const HandleType & operator *() { return cont_t::const_reverse_iterator::operator *(); } const HandleType & operator *() const { return cont_t::const_reverse_iterator::operator *(); }
StorageType operator->() { return StorageType(m_link,cont_t::const_reverse_iterator::operator *()); } StorageType operator->() const { return StorageType(m_link,cont_t::const_reverse_iterator::operator *()); }
}; };
public: public:
template<class InputIterator> template<class InputIterator>
......
...@@ -162,8 +162,8 @@ namespace INMOST ...@@ -162,8 +162,8 @@ namespace INMOST
INMOST_DATA_REAL_TYPE second; ///< the real value of the row element. INMOST_DATA_REAL_TYPE second; ///< the real value of the row element.
/// Comparison operator that helps sorting entries. /// Comparison operator that helps sorting entries.
bool operator < (const entry_s & other) const { return first < other.first || (first == other.first && second < other.second); } bool operator < (const entry_s & other) const { return first < other.first || (first == other.first && second < other.second); }
entry_s& operator =(entry_s const& b) { first = b.first; second = b.second; return *this; } //entry_s& operator =(entry_s const& b) { first = b.first; second = b.second; return *this; }
entry_s(const entry_s& b) : first(b.first), second(b.second) {} //entry_s(const entry_s& b) : first(b.first), second(b.second) {}
entry_s() : first(ENUMUNDEF), second(0.0) {} entry_s() : first(ENUMUNDEF), second(0.0) {}
} entry; } entry;
/// Assemble an entry of entry_s type. /// Assemble an entry of entry_s type.
......
...@@ -304,7 +304,7 @@ namespace INMOST ...@@ -304,7 +304,7 @@ namespace INMOST
{ {
ElementArray<Cell> n_cells = it->getCells(); //get all cells of the node ElementArray<Cell> n_cells = it->getCells(); //get all cells of the node
for (size_t k = 0; k < n_cells.size(); ++k) //assign local enumeration to the cells for (size_t k = 0; k < n_cells.size(); ++k) //assign local enumeration to the cells
n_cells[k].IntegerDF(indexes) = k; n_cells[k].IntegerDF(indexes) = static_cast<Storage::integer>(k);
for (size_t k = 0; k < n_faces.size(); ++k) //stich together node's numbers corresponding to cells if no fracture separates them for (size_t k = 0; k < n_faces.size(); ++k) //stich together node's numbers corresponding to cells if no fracture separates them
{ {
if (!n_faces[k].GetMarker(frac_markers) && n_faces[k].FrontCell().isValid()) if (!n_faces[k].GetMarker(frac_markers) && n_faces[k].FrontCell().isValid())
...@@ -988,7 +988,7 @@ namespace INMOST ...@@ -988,7 +988,7 @@ namespace INMOST
for (size_t k = 0; k < transfer.size(); ++k) //tags for (size_t k = 0; k < transfer.size(); ++k) //tags
{ {
INMOST_DATA_ENUM_TYPE size = a->GetDataSize(transfer[k]); INMOST_DATA_ENUM_TYPE size = a->GetDataSize(transfer[k]);
copy[k].resize(transfer[k].GetBytesSize()*size); copy[k].resize((size_t)transfer[k].GetBytesSize()*size);
if (!copy.empty()) a->GetData(transfer[k], 0, size, &copy[k][0]); if (!copy.empty()) a->GetData(transfer[k], 0, size, &copy[k][0]);
} }
...@@ -998,7 +998,7 @@ namespace INMOST ...@@ -998,7 +998,7 @@ namespace INMOST
//duplicate data //duplicate data
for (size_t k = 0; k < transfer.size(); ++k) for (size_t k = 0; k < transfer.size(); ++k)
{ {
INMOST_DATA_ENUM_TYPE size = copy[k].size() / transfer[k].GetBytesSize(); INMOST_DATA_ENUM_TYPE size = static_cast<INMOST_DATA_ENUM_TYPE>(copy[k].size() / transfer[k].GetBytesSize());
if (size) for (int l = 0; l < 2; ++l) //two parts if (size) for (int l = 0; l < 2; ++l) //two parts
{ {
splitted_a[l].SetDataSize(transfer[k], size); splitted_a[l].SetDataSize(transfer[k], size);
...@@ -1020,7 +1020,7 @@ namespace INMOST ...@@ -1020,7 +1020,7 @@ namespace INMOST
std::set<Point> intersections; std::set<Point> intersections;
std::vector<HandleType> initials(segments.size() * 2); std::vector<HandleType> initials(segments.size() * 2);
MarkerType initial = m->CreatePrivateMarker(); MarkerType initial = m->CreatePrivateMarker();
for (int k = 0; k < (int)segments.size(); ++k) for (size_t k = 0; k < segments.size(); ++k)
{ {
initials[k * 2 + 0] = segments[k]->getBeg()->GetHandle(); initials[k * 2 + 0] = segments[k]->getBeg()->GetHandle();
initials[k * 2 + 1] = segments[k]->getEnd()->GetHandle(); initials[k * 2 + 1] = segments[k]->getEnd()->GetHandle();
...@@ -1029,9 +1029,9 @@ namespace INMOST ...@@ -1029,9 +1029,9 @@ namespace INMOST
intersections.insert(make_point(segments[k]->getBeg(), pnt)); intersections.insert(make_point(segments[k]->getBeg(), pnt));
intersections.insert(make_point(segments[k]->getEnd(), pnt)); intersections.insert(make_point(segments[k]->getEnd(), pnt));
} }
for (int i = 0; i < (int)segments.size(); ++i) for (size_t i = 0; i < segments.size(); ++i)
{ {
for (int j = i + 1; j < (int)segments.size(); ++j) for (size_t j = i + 1; j < segments.size(); ++j)
{ {
std::pair<bool, Point> I = intersect_segments(m, segments[i], segments[j], intersections, pnt, print); std::pair<bool, Point> I = intersect_segments(m, segments[i], segments[j], intersections, pnt, print);
if (I.first) if (I.first)
...@@ -3595,7 +3595,7 @@ namespace INMOST ...@@ -3595,7 +3595,7 @@ namespace INMOST
assert(e.size() == b.size()); assert(e.size() == b.size());
//sort indices according to b //sort indices according to b
indices_sort.resize(b.size()); indices_sort.resize(b.size());
for (size_t l = 0; l < indices_sort.size(); ++l) indices_sort[l] = l; for (size_t l = 0; l < indices_sort.size(); ++l) indices_sort[l] = static_cast<int>(l);
std::sort(indices_sort.begin(), indices_sort.end(), index_comparator(b)); std::sort(indices_sort.begin(), indices_sort.end(), index_comparator(b));
//arrange data in b and e arrays according to indices_sort //arrange data in b and e arrays according to indices_sort
temporary.resize(b.size()); temporary.resize(b.size());
......
...@@ -5300,7 +5300,7 @@ namespace INMOST ...@@ -5300,7 +5300,7 @@ namespace INMOST
{ {
Storage::integer etype = GetHandleElementNum(low_conn_nums[ind+j]); Storage::integer etype = GetHandleElementNum(low_conn_nums[ind+j]);
Storage::integer array_pos = GetHandleID(low_conn_nums[ind+j]); Storage::integer array_pos = GetHandleID(low_conn_nums[ind+j]);
assert(type == GetHandleElementNum(selems[etype][array_pos])); assert(etype == GetHandleElementNum(selems[etype][array_pos]));
low_conn_nums[ind+j] = selems[etype][array_pos]; low_conn_nums[ind+j] = selems[etype][array_pos];
// std::cout << " " << ElementTypeName(GetHandleElementType(low_conn_nums[ind+j])); // std::cout << " " << ElementTypeName(GetHandleElementType(low_conn_nums[ind+j]));
// std::cout << ":" << GetHandleID(low_conn_nums[ind+j]); // std::cout << ":" << GetHandleID(low_conn_nums[ind+j]);
......
...@@ -726,7 +726,7 @@ const INMOST_DATA_ENUM_TYPE UNDEF = ENUMUNDEF, EOL = ENUMUNDEF - 1; ...@@ -726,7 +726,7 @@ const INMOST_DATA_ENUM_TYPE UNDEF = ENUMUNDEF, EOL = ENUMUNDEF - 1;
pG_out.set_interval_end(wend); pG_out.set_interval_end(wend);
#if defined(USE_OMP) #if defined(USE_OMP)
#pragma omp parallel for #pragma omp parallel for
#endif #endif
for(INMOST_DATA_INTEGER_TYPE k = wbeg; k < static_cast<INMOST_DATA_INTEGER_TYPE>(wend); ++k) for(INMOST_DATA_INTEGER_TYPE k = wbeg; k < static_cast<INMOST_DATA_INTEGER_TYPE>(wend); ++k)
{ {
// std::swap(pG_out[k],pG_in[invP[k]]); //invP is where to get the row // std::swap(pG_out[k],pG_in[invP[k]]); //invP is where to get the row
...@@ -981,8 +981,8 @@ const INMOST_DATA_ENUM_TYPE UNDEF = ENUMUNDEF, EOL = ENUMUNDEF - 1; ...@@ -981,8 +981,8 @@ const INMOST_DATA_ENUM_TYPE UNDEF = ENUMUNDEF, EOL = ENUMUNDEF - 1;
for(INMOST_DATA_ENUM_TYPE k = wbeg; k < wend; ++k) for(INMOST_DATA_ENUM_TYPE k = wbeg; k < wend; ++k)
{ {
localP[k] = ENUMUNDEF; localP[k] = ENUMUNDEF;
if( wgt_blk ) wadj_blk[k-wbeg] = G[k].size(); //row connection wgt if( wgt_blk ) wadj_blk[k-wbeg] = (int)G[k].size(); //row connection wgt
if( wgt_sep ) wadj_sep[k-wbeg] = pG[k].size(); if( wgt_sep ) wadj_sep[k-wbeg] = (int)pG[k].size();
} }
for(INMOST_DATA_ENUM_TYPE k = cbeg; k < cend; ++k) localQ[k] = ENUMUNDEF; for(INMOST_DATA_ENUM_TYPE k = cbeg; k < cend; ++k) localQ[k] = ENUMUNDEF;
...@@ -1340,6 +1340,8 @@ const INMOST_DATA_ENUM_TYPE UNDEF = ENUMUNDEF, EOL = ENUMUNDEF - 1; ...@@ -1340,6 +1340,8 @@ const INMOST_DATA_ENUM_TYPE UNDEF = ENUMUNDEF, EOL = ENUMUNDEF - 1;
MLMTILUC_preconditioner::MLMTILUC_preconditioner(Solver::OrderInfo & info) MLMTILUC_preconditioner::MLMTILUC_preconditioner(Solver::OrderInfo & info)
:tau(DEFAULT_TAU),info(&info) :tau(DEFAULT_TAU),info(&info)
{ {
condestL = condestU = 1;
verbosity = 0;
Alink = NULL; Alink = NULL;
init = false; init = false;
sciters = 8; sciters = 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment