alandefreitas / pareto Goto Github PK
View Code? Open in Web Editor NEWSpatial Containers, Pareto Fronts, and Pareto Archives
Home Page: https://alandefreitas.github.io/pareto/
License: MIT License
Spatial Containers, Pareto Fronts, and Pareto Archives
Home Page: https://alandefreitas.github.io/pareto/
License: MIT License
Hello,
I am trying to understand what the number on the right side of the =
sign represent in the examples:
import pyfront
pf = pyfront.front(['minimization', 'maximization'])
pf[0.68322, 0.545438] = 17
pf[-0.204484, 0.819538] = 8
In this case, I assume in pf[0.68322, 0.545438] = 17
, 0.68322 represent the value of objective 1 and 0.545438 represents the value of objective 2. Is that so? What does 17 represent? Could you clarify what the different numbers stand for?
Also could verify if there's a way to install the library using a package manager (like pip
) or does it have to be compiled from source?
Would it be possible to provide python bindings with the 36m suffix? The current bindings is pareto.cpython-38-x86_64-linux-gnu.so and the 38 is not supported on my linux machine, while the pyfront.cpython-36m-x86_64-linux-gnu.so was supported.
Would appreciate a 36m version of the bindings.
Feature category
The problem
Hello Alan. This is a great library. Thank you for releasing it.
Can you please make the default_capacity of 1000 as a compile time
define?
static constexpr size_t default_capacity =
number_of_compile_dimensions == 0 ? 1000
: number_of_compile_dimensions <= 10
? static_cast(50)
<< (number_of_compile_dimensions - 1)
: 100000;
I ran into an issue where I exceeded the 1000 limit and end up asserting when _size != total_front_size().
It took some tracing to see why there was an assert as I didn't know of the 1000 limit.
The solution I'd like
#ifndef DEFAULT_CAPACITY
#define DEFAULT_CAPACITY 1000
#endif
static constexpr size_t default_capacity =
number_of_compile_dimensions == 0 ? DEFAULT_CAPACITY
: number_of_compile_dimensions <= 10
? static_cast(50)
<< (number_of_compile_dimensions - 1)
: 100000;
Alternatives I've considered
None
Additional context
Hi Alan, I'm making a call to pareto::front.hypervolume()
and found that this call leaks memory. When running through valgrind, this is the error that I'm getting:
==77189== Mismatched free() / delete / delete []
==77189== at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==77189== by 0x1A6082: pareto::fpli_hv(double*, int, int, double const*) (hypervolume.h:820)
==77189== by 0x1ACCDA: pareto::front<long, 3ul, unsigned int, pareto::r_tree<long, 3ul, unsigned int, std::less<long>, std::allocator<std::pair<pareto::point<long, 3ul, void> const, unsigned int> > > >::hypervolume(pareto::point<long, 3ul, void>) const (front.h:930)
And the final valgrind ouput looks like this:
==77189==
==77189== HEAP SUMMARY:
==77189== in use at exit: 391,049 bytes in 4,115 blocks
==77189== total heap usage: 1,901,304 allocs, 1,897,189 frees, 471,587,726 bytes allocated
==77189==
==77189== LEAK SUMMARY:
==77189== definitely lost: 8,008 bytes in 32 blocks
==77189== indirectly lost: 265,176 bytes in 2,133 blocks
==77189== possibly lost: 0 bytes in 0 blocks
==77189== still reachable: 117,865 bytes in 1,950 blocks
==77189== suppressed: 0 bytes in 0 blocks
==77189== Rerun with --leak-check=full to see details of leaked memory
==77189==
==77189== For counts of detected and suppressed errors, rerun with: -v
==77189== ERROR SUMMARY: 32487 errors from 7 contexts (suppressed: 0 from 0)
Do you have any ideas for fixing this problem? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.