Comments (4)
I think I have this working. Here's an indexer:
12 01000|10101|00100
13 00010|10101|00100
15 10000|01111|00001
21 00100|10001|00001
22 01000|10111|00010
27 10000|01110|00100
31 00100|01010|00010
42 00100|11011|01010
43 00100|11011|00001
54 00001|01110|00100
57 00001|11110|01110
61 10001|01010|00010
63 00010|11101|01000
70 10001|01110|00100
73 01110|10001|00001
74 01010|10001|00001
75 01010|10101|00100
76 10101|01010|00010
Results for (2,(1,3)5,(0,4)6)7;
:
[[54, 31, 15], [21, 13, 22], [74, 42, 61], [21, 12, 63], [27, 31, 57], [21, 75, 76], [70, 73, 31], []]
from bito.
Here's the rootsplit part of the indexer:
0 01000
1 00011
2 00110
3 00100
4 01010
5 00010
6 00111
7 01001
8 01111
9 00101
10 00001
11 01110
The rootsplit part of the results on the same tree is:
[8, 0, 3, 5, 10, 4, 11]
which also looks correct. These are now formalized in unit tests.
from bito.
Here's another test, on (((0,1)5,2)6,3,4)7;
0 01000
1 00011
3 00100
5 00010
6 00111
8 01111
10 00001
16 10000|01111|00111
23 01000|10111|00111
29 00001|11100|00100
30 00011|11100|00100
34 00011|11000|01000
36 01000|00111|00011
39 11000|00011|00001
40 11100|00011|00001
41 00010|11100|00100
44 00100|11011|00011
47 11000|00111|00011
49 10000|00111|00011
50 00100|00011|00001
51 00111|11000|01000
59 00001|11110|00010
65 00010|11101|00001
72 00100|11000|01000
[8, 0, 3, 5, 10, 6, 1],
[[50, 36, 16], [50, 49, 23], [39, 34, 44], [29, 65, 72], [59, 41, 72], [50, 47, 51], [40, 30, 72]]
This exercises the last part of the code with the conditional recursion.
from bito.
We could export the vector<size_t>
s as buffers. I elected to not do so, but if we wanted to:
py::class_<std::vector<size_t>>(m, "vector_size_t", py::buffer_protocol())
.def_buffer([](std::vector<size_t> &v) -> py::buffer_info {
return py::buffer_info(
v.data(), // Pointer to buffer
sizeof(size_t), // Size of one scalar
py::format_descriptor<size_t>::format(), // See docs
1, // Number of dimensions
{v.size()}, // Buffer dimensions
{sizeof(size_t)}); // Stride
});
...
// Same for vector<size_t>.
PYBIND11_MAKE_OPAQUE(std::vector<size_t>);
@zcrabbit If you want this, let me know.
from bito.
Related Issues (20)
- Top-Pruning: PLVHandler Update
- Top-Pruning: ChoiceMap -- TreeMask Update and Build Trees HOT 3
- parsimony 1: perform Sankoff on trees HOT 2
- parsimony 2 Sankoff on DAG
- Top-Pruning: Top-Pruning Engine & Init on Tree HOT 2
- yet more iteration over unordered maps leading to inconsistent behavior
- TPEngine: Init DAG for Likelihood
- TPEngine: Init DAG for Parsimony
- TPEngine: Update after Add NNI
- TPEngine: Add Rescaling to Likelihood Computations
- TPEngine: Move PVs from Node-based to Edge-based HOT 2
- Interfaces for Evaluation Engines
- Optimization fails after Brent templating
- TPEngine: Assign an edge's neighbors based on "edge heuristic" instead of "subsplit heuristic". HOT 2
- Errors compiling bito with GitHub action and locally
- Rooted trees ignore original taxa labels
- SubsplitDAG: Add map for quick lookup of parent and child nodes.
- DAGStorage throws error where line references a line outside of range.
- Bug: GP Branch lengths are not being updated from default branch length during NNI search.
- Add Dockerfile
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bito.