Skip to content

Commit e7dc330

Browse files
committed
renaming to cvt
Signed-off-by: Christian Henkel <[email protected]>
1 parent 9c93955 commit e7dc330

File tree

8 files changed

+27
-27
lines changed

8 files changed

+27
-27
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ roadmaps/benchmark_examples/
5656
roadmaps/benchmark_plots/benchmark.png
5757
roadmaps/benchmark_plots/benchmark_*.png
5858

59-
# build folder for cvd
60-
roadmaps/cvd/build/*
59+
# build folder for cvt
60+
roadmaps/cvt/build/*

roadmaps/benchmark.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -401,24 +401,24 @@ def __init__(self,
401401
# self._set_graph(g)
402402

403403

404-
class CVD(RoadmapToTest):
404+
class CVT(RoadmapToTest):
405405
def __init__(self,
406406
map_fname: str,
407407
rng: Random,
408408
roadmap_specific_kwargs):
409409
super().__init__(map_fname, rng, roadmap_specific_kwargs)
410-
from roadmaps.cvd.build.libcvd import CVD
410+
from roadmaps.cvt.build.libcvt import CVT
411411
from roadmaps.var_odrm_torch.var_odrm_torch import (
412412
make_graph_and_flann, optimize_poses)
413413

414414
# prepare args
415-
cvd_kwargs = self.roadmap_specific_kwargs.copy()
415+
cvt_kwargs = self.roadmap_specific_kwargs.copy()
416416

417-
# run cvd
418-
cvd = CVD()
419-
nodes, runtime_points = cvd.run(
417+
# run cvt
418+
cvt = CVT()
419+
nodes, runtime_points = cvt.run(
420420
mapFile=map_fname,
421-
**cvd_kwargs,
421+
**cvt_kwargs,
422422
plot=False,
423423
)
424424
pos = torch.Tensor(nodes) / roadmap_specific_kwargs["resolution"]
@@ -700,7 +700,7 @@ def run():
700700
df = pd.DataFrame()
701701
ns = [500, 1200, 2000]
702702
trials = [
703-
(CVD, {
703+
(CVT, {
704704
'DA': 0.14,
705705
'DB': 0.06,
706706
'f': 0.035,
@@ -710,7 +710,7 @@ def run():
710710
'target_n': ns[0],
711711
'plot': True,
712712
}),
713-
(CVD, {
713+
(CVT, {
714714
'DA': 0.14,
715715
'DB': 0.06,
716716
'f': 0.035,
@@ -719,7 +719,7 @@ def run():
719719
'iterations': 10000,
720720
'target_n': ns[1],
721721
}),
722-
(CVD, {
722+
(CVT, {
723723
'DA': 0.14,
724724
'DB': 0.06,
725725
'f': 0.035,

roadmaps/cvd/CMakeLists.txt roadmaps/cvt/CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.5)
2-
project(cvd)
2+
project(cvt)
33

44
set(CMAKE_CXX_STANDARD 14)
55
# set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -29,15 +29,15 @@ include_directories(
2929
)
3030

3131
# the python module
32-
SET(cvd cvd)
32+
SET(cvt cvt)
3333

34-
add_library(${cvd} SHARED
35-
src/${cvd}.cpp
34+
add_library(${cvt} SHARED
35+
src/${cvt}.cpp
3636
lodepng/lodepng.cpp
3737
)
3838

3939
TARGET_LINK_LIBRARIES(
40-
${cvd}
40+
${cvt}
4141
${Boost_LIBRARIES}
4242
${OpenCV_LIBS}
4343
)

roadmaps/cvd/README.md roadmaps/cvt/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Centroidal Voronoi tessellation (CVD)
1+
# Centroidal Voronoi Tessellation (CVT)
22

33
## Requirements
44

File renamed without changes.

roadmaps/cvd/demo.py roadmaps/cvt/demo.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
import matplotlib.image as mpimg
33
import numpy as np
44

5-
from roadmaps.cvd.build.libcvd import CVD
5+
from roadmaps.cvt.build.libcvt import CVT
66

77
if __name__ == '__main__':
88
img_path = "roadmaps/odrm/odrm_eval/maps/plain.png"
99

10-
cvd = CVD()
11-
(nodes, t) = cvd.run(img_path, 100)
10+
cvt = CVT()
11+
(nodes, t) = cvt.run(img_path, 100)
1212
img = mpimg.imread(img_path)
1313
nodes = np.array(nodes)
1414

File renamed without changes.

roadmaps/cvd/src/cvd.cpp roadmaps/cvt/src/cvt.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
#include <chrono>
1111
using namespace std::chrono;
1212

13-
class CVD
13+
class CVT
1414
{
1515
public:
16-
CVD()
16+
CVT()
1717
{
1818
}
1919

2020
boost::python::tuple run(
2121
std::string mapFile, int n_nodes, int seed = 1)
2222
{
23-
std::string example_folder = "roadmaps/cvd/examples/";
23+
std::string example_folder = "roadmaps/cvt/examples/";
2424

2525
// seed opencv rng
2626
cv::RNG rng(seed);
@@ -104,13 +104,13 @@ class CVD
104104
}
105105
};
106106

107-
BOOST_PYTHON_MODULE(libcvd)
107+
BOOST_PYTHON_MODULE(libcvt)
108108
{
109109
using namespace boost::python;
110110
namespace bp = boost::python;
111-
class_<CVD>("CVD", init<>())
111+
class_<CVT>("CVT", init<>())
112112
.def(
113-
"run", &CVD::run,
113+
"run", &CVT::run,
114114
(bp::arg("mapFile"), bp::arg("n_nodes"), bp::arg("seed") = 0)
115115
)
116116
;

0 commit comments

Comments
 (0)