giny.model.Node.getRootGraph()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(217)

本文整理了Java中giny.model.Node.getRootGraph()方法的一些代码示例,展示了Node.getRootGraph()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getRootGraph()方法的具体详情如下:
包路径:giny.model.Node
类名称:Node
方法名:getRootGraph

Node.getRootGraph介绍

暂无

代码示例

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public int getIndex(Node node) {
  9. if (node.getRootGraph() == this)
  10. return node.getRootGraphIndex();
  11. else
  12. return 0;
  13. }

代码示例来源:origin: cytoscape/application

  1. public int nextInt() {
  2. if ((nodeArr[index] == null) || (nodeArr[index].getRootGraph() != root))
  3. throw new IllegalArgumentException();
  4. return nodeArr[index++].getRootGraphIndex();
  5. }
  6. },

代码示例来源:origin: cytoscape.corelibs/fing

  1. public int nextInt() {
  2. if ((nodeArr[index] == null) || (nodeArr[index].getRootGraph() != root))
  3. throw new IllegalArgumentException();
  4. return nodeArr[index++].getRootGraphIndex();
  5. }
  6. },

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param child DOCUMENT ME!
  5. * @param parent DOCUMENT ME!
  6. *
  7. * @return DOCUMENT ME!
  8. */
  9. public boolean isMetaParent(Node child, Node parent) {
  10. if ((child.getRootGraph() != this) || (parent.getRootGraph() != this))
  11. return false;
  12. return isNodeMetaParent(child.getRootGraphIndex(), parent.getRootGraphIndex());
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param parent DOCUMENT ME!
  5. * @param child DOCUMENT ME!
  6. *
  7. * @return DOCUMENT ME!
  8. */
  9. public boolean addMetaChild(Node parent, Node child) {
  10. if ((parent.getRootGraph() != this) || (child.getRootGraph() != this))
  11. return false;
  12. return addNodeMetaChild(parent.getRootGraphIndex(), child.getRootGraphIndex());
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public boolean containsNode(Node node) {
  9. return (node.getRootGraph() == this) && (getNode(node.getRootGraphIndex()) != null);
  10. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public java.util.List nodeMetaChildrenList(Node node) {
  9. if (node.getRootGraph() != this)
  10. return null;
  11. return nodeMetaChildrenList(node.getRootGraphIndex());
  12. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public java.util.List metaParentsList(Node node) {
  9. if (node.getRootGraph() != this)
  10. return null;
  11. return nodeMetaParentsList(node.getRootGraphIndex());
  12. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public java.util.List edgeMetaChildrenList(Node node) {
  9. if (node.getRootGraph() != this)
  10. return null;
  11. return edgeMetaChildrenList(node.getRootGraphIndex());
  12. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public Node restoreNode(Node node) {
  9. if ((node.getRootGraph() == m_root) && (restoreNode(node.getRootGraphIndex()) != 0)) {
  10. return node;
  11. } else {
  12. return null;
  13. }
  14. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public int getDegree(Node node) {
  9. if (node.getRootGraph() == m_root) {
  10. return getDegree(node.getRootGraphIndex());
  11. } else {
  12. return -1;
  13. }
  14. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public Node removeNode(Node node) {
  9. if ((node.getRootGraph() == this) && (removeNode(node.getRootGraphIndex()) != 0))
  10. return node;
  11. else
  12. return null;
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public java.util.List metaParentsList(Node node) {
  9. if (!(node.getRootGraph() == m_root)) {
  10. return null;
  11. }
  12. return nodeMetaParentsList(node.getRootGraphIndex());
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public java.util.List nodeMetaChildrenList(Node node) {
  9. if (!(node.getRootGraph() == m_root)) {
  10. return null;
  11. }
  12. return nodeMetaChildrenList(node.getRootGraphIndex());
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public int getInDegree(Node node) {
  9. if (node.getRootGraph() == this)
  10. return getInDegree(node.getRootGraphIndex());
  11. else
  12. return -1;
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public boolean containsNode(Node node) {
  9. int nativeInx;
  10. return (node.getRootGraph() == m_root)
  11. && ((nativeInx = m_rootToNativeNodeInxMap.get(~(node.getRootGraphIndex()))) >= 0)
  12. && (nativeInx != Integer.MAX_VALUE);
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public java.util.List edgeMetaChildrenList(Node node) {
  9. if (!(node.getRootGraph() == m_root)) {
  10. return null;
  11. }
  12. return edgeMetaChildrenList(node.getRootGraphIndex());
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param node DOCUMENT ME!
  5. *
  6. * @return DOCUMENT ME!
  7. */
  8. public int getOutDegree(Node node) {
  9. if (node.getRootGraph() == this)
  10. return getOutDegree(node.getRootGraphIndex());
  11. else
  12. return -1;
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param parent DOCUMENT ME!
  5. * @param child DOCUMENT ME!
  6. *
  7. * @return DOCUMENT ME!
  8. */
  9. public boolean addMetaChild(Node parent, Edge child) {
  10. if ((parent.getRootGraph() != this) || (child.getRootGraph() != this))
  11. return false;
  12. return addEdgeMetaChild(parent.getRootGraphIndex(), child.getRootGraphIndex());
  13. }

代码示例来源:origin: cytoscape.corelibs/fing

  1. /**
  2. * DOCUMENT ME!
  3. *
  4. * @param child DOCUMENT ME!
  5. * @param parent DOCUMENT ME!
  6. *
  7. * @return DOCUMENT ME!
  8. */
  9. public boolean isMetaParent(Edge child, Node parent) {
  10. if ((child.getRootGraph() != this) || (parent.getRootGraph() != this))
  11. return false;
  12. return isEdgeMetaParent(child.getRootGraphIndex(), parent.getRootGraphIndex());
  13. }

相关文章