hash specialization for std::hash<tf::Task> More...
#include <taskflow/core/task.hpp>
hash specialization for std::hash<tf::Task>
hash specialization for std::hash<tf::TaskView>
The hash value of a tf::Task is computed based on the underlying task node pointer. Two tf::Task objects have the same hash value if and only if they reference the same underlying node in the taskflow graph.
Two tf::Task objects are:
tf::Task objects created from different taskflow calls or different task insertions will have different hash values, even if they represent logically similar work. The hash function is based on the associated object identity (i.e., underlying node pointer), not semantic equivalence.
The hash value of a tf::TaskView is computed based on the underlying task node address. Two tf::TaskView objects have the same hash value if and only if they reference the same underlying node in the taskflow graph. The hash function is based on the associated object identity (i.e., underlying node pointer), not semantic equivalence.
Two tf::TaskView objects are:
Since tf::TaskView is a lightweight read-only view (typically passed by reference or returned by graph traversal functions), hash equality follows the same node identity principle as tf::Task: it depends on which task node is being viewed, not on any semantic property of the task.