knitr::opts_chunk$set(echo = TRUE) library(sdcHierarchies)
h <- hier_create(root = "Total", nodes = c('processDocument')) # processDocument h <- hier_add(h, root = "processDocument", nodes = c("readPNGBinary", "thinImage", "processHandwriting")) h <- hier_add(h, root = "processHandwriting", nodes = c("getNodes", "skeletonize", "getComponents", "mergeAllNodes", "getPaths", "splitPathsIntoGraphs", "organizeGraphs", "createGraphLists", "addGraphFeatures", 'flatten_list'))
h <- hier_add(h, root = 'getNodes', nodes = c('i_to_rc (1)', 'countChanges', 'node2by2fill')) h <- hier_add(h, root = 'node2by2fill', nodes = c('findNeighbors (1)'))
h <- hier_add(h, root = 'skeletonize', nodes = c('getSkeletonDF', 'getSkeleton (1)')) h <- hier_add(h, root = 'getSkeletonDF', nodes = c('i_to_rc (2)', 'findNeighbors (2)'))
h <- hier_add(h, root = 'getComponents', nodes = c('initializeComponents', 'addSkeletons', 'addIndices', 'addNodes', 'addSkeleton0s', 'addAdjMatrices')) h <- hier_add(h, root = 'addIndices', nodes = c('i_to_rc (3)')) h <- hier_add(h, root = 'addSkeleton0s', nodes = c('getSkeletonDF0', 'getSkeleton (2)')) h <- hier_add(h, root = 'getSkeletonDF0', nodes = c('findNeighbors0')) h <- hier_add(h, root = 'findNeighbors0', nodes = c('findNeighbors (3)')) h <- hier_add(h, root = 'addAdjMatrices', nodes = c('getAdjMatrix'))
h <- hier_add(h, root = 'mergeAllNodes', nodes = c('mergeNodes')) h <- hier_add(h, root = 'mergeNodes', nodes = c('i_to_r (1)', 'i_to_c (1)', 'findMergeNodes', 'migrateConnections'))
h <- hier_add(h, root = 'getPaths', nodes = c('getAllNonLoopPaths', 'getAllLoops', 'updateAllSkeleton0s')) h <- hier_add(h, root = 'getAllNonLoopPaths', nodes = c('getNonLoopPathsForComponent')) h <- hier_add(h, root = 'getAllLoops', nodes = c('getLoopsForComponent')) h <- hier_add(h, root = 'updateAllSkeleton0s', nodes = c('updateSkeleton0'))
h <- hier_add(h, root = 'splitPathsIntoGraphs', nodes = c('getAllBreakPoints', 'updateAllBreakPoints', 'isolateAllGraphs', 'assignGraphIDs')) h <- hier_add(h, root = 'getAllBreakPoints', nodes = c('getBreakPointsForComponent', 'addTroughNodes')) h <- hier_add(h, root = 'getBreakPointsForComponent', nodes = c('findTroughNodes')) h <- hier_add(h, root = 'findTroughNodes', nodes = c('isTroughNode')) h <- hier_add(h, root = 'addTroughNodes', nodes = c('i_to_r (2)', 'i_to_c (2)')) h <- hier_add(h, root = 'updateAllBreakPoints', nodes = c('updateBreakPointsForComponent')) h <- hier_add(h, root = 'updateBreakPointsForComponent', nodes = c('getNodeGraph', 'checkBreakPoints')) h <- hier_add(h, root = 'isolateAllGraphs', nodes = c('isolateGraphsForComponent')) h <- hier_add(h, root = 'isolateGraphsForComponent', nodes = c('makeGraphs', 'checkStacking', 'checkSimplicityBreaks')) h <- hier_add(h, root = 'checkSimplicityBreaks', nodes = c('pathLetterAssociate (1)'))
h <- hier_add(h, root = 'organizeGraphs', nodes = c('organizeGraphsForComponent'))
h <- hier_add(h, root = 'createGraphLists', nodes = c('createGraphListsForComponent')) h <- hier_add(h, root = 'createGraphListsForComponent', nodes = c('pathLetterAssociate (2)', 'getConnectivity', 'getNodeOrder')) h <- hier_add(h, root = 'getNodeOrder', nodes = c('angleDiff')) h <- hier_add(h, root = 'angleDiff', nodes = c('toRC'))
h <- hier_add(h, root = 'addGraphFeatures', nodes = c('addGraphFeaturesForComponent')) h <- hier_add(h, root = 'addGraphFeaturesForComponent', nodes = c('extract_character_features')) h <- hier_add(h, root = 'extract_character_features', nodes = c('char_to_feature', 'add_updown_neighboring_char_dist', 'add_line_info', 'nov_neighboring_char_dist', 'add_covariance_matrix')) h <- hier_add(h, root = 'char_to_feature', nodes = c('get_aspect_info', 'get_centroid_info')) h <- hier_add(h, root = 'get_aspect_info', nodes = c('i_to_rci (1)')) h <- hier_add(h, root = 'get_centroid_info', nodes = c('i_to_rci (2)', 'rc_to_i (1)')) h <- hier_add(h, root = 'add_updown_neighboring_char_dist', nodes = c('i_to_rci (3)', 'rc_to_i (2)')) h <- hier_add(h, root = 'add_line_info', nodes = c('line_number_extract', 'all_down_dists', 'all_centroids')) h <- hier_add(h, root = 'line_number_extract', nodes = c('i_to_rci (4)')) h <- hier_add(h, root = 'nov_neighboring_char_dist', nodes = c('character_features_by_line')) h <- hier_add(h, root = 'add_covariance_matrix', nodes = c('i_to_rc (4)'))
hier_display(h)
comps[[i]]$nodes$adj0
for nodes with the following steps:skeleton0
with 1 if either vertex is a node, this is the node_only_distadj0
that shows each pair of nodes. If two nodes areadj0
.adjm
based on an updated version of adj0
that includes the new nodes created from merging and the old, merged nodes are removed. Each row of adjm
is a pair of nodes where the shortest path between them does not run through any other nodes.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.