-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctions.cc
More file actions
50 lines (41 loc) · 1.24 KB
/
Functions.cc
File metadata and controls
50 lines (41 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (c) 2008 National ICT Australia Limited (NICTA)
//
// Author: Charles Gretton (charles.gretton@nicta.com.au)
//
// Redistribution and use in source and binary forms, with or without
// modification and only for non-commercial research and educational
// purposes are permitted provided that the conditions in the
// accompanying file "licence.txt" are met.
#include "Functions.hh"
using namespace Planning;
template<typename RANGE, typename BASE>
Invocation<RANGE, BASE>::Invocation(const PredicateName& predicateName,
const Parameters& parameters,
const RANGE& rangeValue)
:Predicate<BASE>(predicateName, parameters),
rangeValue(rangeValue)
{
for_each(parameters.begin(),
parameters.end(),
Proposition<>::assert_Constant());
}
template<typename RANGE, typename BASE>
size_t Function<RANGE, BASE>::hash_value() const
{
size_t tmp = Predicate<BASE>::hash_value();
boost::hash_combine(tmp, typeid(RANGE).name());
return tmp;
}
template<typename RANGE, typename BASE>
size_t Invocation<RANGE, BASE>::hash_value() const
{
size_t tmp = Function<RANGE, BASE>::hash_value();
boost::hash_combine(tmp, rangeValue);
return tmp;
}
namespace FUNCTIONS_Nonsense
{
void foo()
{
}
}