mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
rogueviz::embeddings:: mark_signposts_subg
This commit is contained in:
parent
8b3ea9031a
commit
cc18251160
@ -113,6 +113,25 @@ void mark_signposts(bool full, const vector<cell*>& ac) {
|
||||
signposts.push_back(c);
|
||||
}
|
||||
|
||||
/** special signposts */
|
||||
|
||||
void mark_signposts_subg(int a, int b, const vector<cell*>& ac) {
|
||||
etype = eSignpost;
|
||||
println(hlog, "marking bitrunc signposts");
|
||||
signposts.clear();
|
||||
int maxd = 0;
|
||||
if(!bounded)
|
||||
for(cell *c: ac) maxd = max(celldist(c), maxd);
|
||||
for(cell *c: ac) {
|
||||
auto li = gp::get_local_info(c);
|
||||
auto rel = li.relative * gp::loc(a, b);
|
||||
auto rel2 = rel * gp::param.conj();
|
||||
rel2 = rel2 / (gp::param * gp::param.conj()).first;
|
||||
if(rel2 * gp::param == rel)
|
||||
signposts.push_back(c);
|
||||
}
|
||||
}
|
||||
|
||||
/** rug embedding */
|
||||
|
||||
map<cell*, hyperpoint> rug_coordinates;
|
||||
|
@ -70,6 +70,10 @@ bool finished();
|
||||
|
||||
vector<cell*> gen_neuron_cells();
|
||||
neuron& winner(int id);
|
||||
|
||||
double vdot(const kohvec& a, const kohvec& b);
|
||||
void vshift(kohvec& a, const kohvec& b, ld i);
|
||||
double vnorm(kohvec& a, kohvec& b);
|
||||
}
|
||||
|
||||
namespace embeddings {
|
||||
@ -81,12 +85,15 @@ using kohonen::alloc;
|
||||
enum embedding_type { eProjection, eNatural, eLandscape, eSignpost, eHypersian };
|
||||
extern embedding_type etype;
|
||||
void mark_signposts(bool full, const vector<cell*>& ac);
|
||||
void mark_signposts_subg(int a, int b, const vector<cell*>& ac);
|
||||
void generate_rug(int i, bool close);
|
||||
void init_landscape(int dimensions);
|
||||
|
||||
extern map<cell*, hyperpoint> rug_coordinates;
|
||||
extern void get_coordinates(kohvec& v, cell *c, cell *c0);
|
||||
|
||||
extern vector<cell*> signposts;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user