Coder Social home page Coder Social logo

Comments (3)

orwant avatar orwant commented on May 18, 2024
From what I understand from the code you could write it like this, solving the problem
and making it faster :

virtual void InitialPropagate() {
  // Build active_ structure.
  for (int var_index = 0; var_index < arity_; ++var_index) {
    for (ConstIter<hash_map<int64, uint64*> > it(masks_[var_index]); !it.at_end();
++it) {
      if (!vars_[var_index]->Contains(it->first)) {
        for (int i = 0; i < length_; ++i) {
          active_tuples_[i] &= ~(active_tuples_[i] & it->second[i]);
        }
      }
    }
  }
  (...)
}

Reported by phil.vank on 2011-09-16 06:17:20

from or-tools.

orwant avatar orwant commented on May 18, 2024
I will have a look right away.
Thanks for the bug report.

Reported by laurent.perron on 2011-09-17 08:26:00

from or-tools.

orwant avatar orwant commented on May 18, 2024
I have added you suggestion and cleaned up the code around.
Thanks!

Reported by laurent.perron on 2011-09-17 08:49:00

  • Status changed: Fixed

from or-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.