Skip to content

API harmonization: insert #5

@jblachly

Description

@jblachly

Currently, AVL tree and Splay tree insert function signatures differ:

AVL:
Node *insert(Node *x, out uint cnt)

Splay:
Node * insert(IntervalType i)

In practice then calling code looks like:

                    foreach(link; c.links)
                    {
                        version(avl)    { uint cnt; (*tree).insert( new IntervalTreeNode!ChainLink(*link), cnt ); }
                        version(splay)  (*tree).insert(*link);

Proposal:
Both should take an IntervalType (current behavior of splay tree)

As a bonus, could also include overload that takes pointer

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions