-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmdddelta.cpp
More file actions
29 lines (27 loc) · 874 Bytes
/
mdddelta.cpp
File metadata and controls
29 lines (27 loc) · 874 Bytes
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
/*
* mini-cp is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3
* as published by the Free Software Foundation.
*
* mini-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with mini-cp. If not, see http://www.gnu.org/licenses/lgpl-3.0.en.html
*
* Copyright (c) 2018. by Laurent Michel, Pierre Schaus, Pascal Van Hentenryck
*/
#include "mdddelta.hpp"
void MDDDelta::adaptDelta()
{
int nsz = _nf->peakNodes();
MDDStateDelta** nt = new MDDStateDelta*[nsz];
for(int i=0;i < _csz;i++)
nt[i] = _t[i];
for(int i=_csz;i < nsz;i++)
nt[i] = nullptr;
delete[]_t;
_t = nt;
_csz = nsz;
}