All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.tmatek.zhangshasha.TreeOperation Maven / Gradle / Ivy

Go to download

A Java implementation of Zhang-Shasha algorithm for ordered tree distance calculation. Calculates a series of transformations required to transform one tree into another. Every transformation has an associated cost. The sum of costs of all transformations is minimal - the tree distance.

There is a newer version: 1.01
Show newest version
package com.github.tmatek.zhangshasha;

/**
 * Possible tree operations which transform one tree to another:
 * 
    *
  • {@link #OP_DELETE_NODE}
  • *
  • {@link #OP_RENAME_NODE}
  • *
  • {@link #OP_INSERT_NODE}
  • *
*/ public enum TreeOperation { /** * Delete an existing node from the tree structure, promoting its children one level up. */ OP_DELETE_NODE, /** * Rename an existing node in the tree structure to a new label. */ OP_RENAME_NODE, /** * Insert a new node into the tree structure as a child of parent p, at specified position * k, making m next siblings children of the inserted node. */ OP_INSERT_NODE }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy