Class FastWeightedTree<U>
java.lang.Object
es.uam.eps.ir.relison.graph.fast.AbstractFastGraph<U>
es.uam.eps.ir.relison.graph.tree.fast.FastTree<U>
es.uam.eps.ir.relison.graph.tree.fast.FastWeightedTree<U>
- Type Parameters:
U
- Type of the nodes.
- All Implemented Interfaces:
DirectedGraph<U>
,FastGraph<U>
,Graph<U>
,Tree<U>
,WeightedTree<U>
,WeightedGraph<U>
,ReducedIndex<U>
,java.io.Serializable
public class FastWeightedTree<U> extends FastTree<U> implements WeightedTree<U>
Fast implementation of a weighted tree.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FastWeightedTree()
Constructor. -
Method Summary
Modifier and Type Method Description double[][]
getAdjacencyMatrix(EdgeOrientation direction)
Gets the adjacency matrix.Tree<U>
getDescendants(U parent)
Obtains the subtree formed by the user and its descendants.Methods inherited from class es.uam.eps.ir.relison.graph.tree.fast.FastTree
addChild, addEdge, addNode, addRoot, getAdjacencyMatrixMap, getChildren, getChildrenCount, getChildrenWeights, getLeaves, getLeaves, getLevel, getLevels, getParent, getParentWeight, getRoot, isAscendant, isLeaf, isParent, isRoot
Methods inherited from class es.uam.eps.ir.relison.graph.fast.AbstractFastGraph
addEdge, complement, containsEdge, containsEdge, containsVertex, getAdjacentEdgesCount, getAdjacentMutualNodesTypes, getAdjacentMutualNodesWeights, getAdjacentNodes, getAdjacentNodesTypes, getAdjacentNodesWeights, getAllNodes, getAllNodesIds, getEdgeCount, getEdgeType, getEdgeWeight, getEdgeWeight, getIncidentEdgesCount, getIncidentMutualNodesTypes, getIncidentMutualNodesWeights, getIncidentNodes, getIncidentNodesTypes, getIncidentNodesWeights, getIndex, getIsolatedNodeIds, getIsolatedNodes, getMutualEdgesCount, getMutualNodes, getMutualNodesTypes, getMutualNodesWeights, getNeighborhood, getNeighborhoodTypes, getNeighborhoodWeights, getNeighbourhood, getNeighbourNodes, getNeighbourNodesTypes, getNeighbourNodesWeights, getNodesIdsWithEdges, getNodesWithAdjacentNeighbors, getNodesWithIncidentNeighbors, getNodesWithMutualNeighbors, getNodesWithNeighbors, getNodesWithNeighbors, getVertexCount, hasAdjacentNeighbors, hasIncidentNeighbors, hasMutualNeighbors, hasNeighbors, idx2object, object2idx, removeEdge, removeNode, updateEdgeType, updateEdgeWeight, updateEdgeWeight
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface es.uam.eps.ir.relison.graph.DirectedGraph
degree, degree, getNeighbourEdgesCount, getNeighbourhood, getNeighbourhoodSize, getNeighbourhoodTypes, getNeighbourhoodWeights, getSinks, getSources, inDegree, isDirected, mutualDegree, outDegree
Methods inherited from interface es.uam.eps.ir.relison.graph.Graph
addEdge, addEdge, addEdge, addEdge, addEdge, complement, containsEdge, containsVertex, getAdjacencyMatrixMap, getAdjacentEdgesCount, getAdjacentMutualNodesTypes, getAdjacentMutualNodesWeights, getAdjacentNodes, getAdjacentNodesCount, getAdjacentNodesTypes, getAllNodes, getEdgeCount, getEdgeType, getEdgeWeight, getIncidentEdgesCount, getIncidentMutualNodesTypes, getIncidentMutualNodesWeights, getIncidentNodes, getIncidentNodesCount, getIncidentNodesTypes, getIsolatedNodes, getMutualEdgesCount, getMutualNodes, getMutualNodesCount, getMutualNodesTypes, getMutualNodesWeights, getNeighbourNodes, getNeighbourNodesCount, getNeighbourNodesTypes, getNodesWithAdjacentNeighbors, getNodesWithIncidentNeighbors, getNodesWithMutualNeighbors, getNodesWithNeighbors, getNodesWithNeighbors, getVertexCount, hasAdjacentNeighbors, hasIncidentNeighbors, hasMutualNeighbors, hasNeighbors, hasNeighbors, isMultigraph, isMutual, removeEdge, removeNode, updateEdgeType, updateEdgeWeight
Methods inherited from interface es.uam.eps.ir.relison.graph.tree.Tree
addChild, addChild, addChild, addEdge, addNode, addRoot, getChildren, getChildrenCount, getChildrenWeights, getLeaves, getLeaves, getLevel, getLevels, getParent, getParentWeight, getRoot, isAscendant, isChild, isDescendant, isLeaf, isParent, isRoot
Methods inherited from interface es.uam.eps.ir.relison.graph.WeightedGraph
getAdjacentNodesWeights, getIncidentNodesWeights, getNeighbourNodesWeights, isWeighted
-
Constructor Details
-
FastWeightedTree
public FastWeightedTree()Constructor.
-
-
Method Details
-
getDescendants
Description copied from interface:Tree
Obtains the subtree formed by the user and its descendants.- Specified by:
getDescendants
in interfaceTree<U>
- Parameters:
parent
- the parent node.- Returns:
- a tree rooted in the parent if the node exists, null if not
-
getAdjacencyMatrix
Description copied from interface:Graph
Gets the adjacency matrix.- Specified by:
getAdjacencyMatrix
in interfaceGraph<U>
- Parameters:
direction
- The direction of the edges.- Returns:
- the adjacency matrix.
-