Exemplo n.º 1
0
 public override void Insert(ImageDatabase.Element element)
 {
     elems.Add(element);
 }
Exemplo n.º 2
0
 public Node(ImageDatabase.Element data, int depth)
 {
     this.data = data;
     this.depth = depth;
 }
Exemplo n.º 3
0
 public void Insert(ImageDatabase.Element element)
 {
     byte refPos = GetColorDimension(dimension, element.color);
     byte cmpPos = GetColorDimension(dimension, data.color);
     int child = refPos < cmpPos ? 0 : 1;
     if (children[child] == null)
     {
         children[child] = new Node(element, depth + 1);
     }
     else
     {
         children[child].Insert(element);
     }
 }
Exemplo n.º 4
0
 public override void Insert(ImageDatabase.Element element)
 {
     if (root == null)
     {
         root = new Node(element, 0);
     }
     else
     {
         root.Insert(element);
     }
 }