code: public LinkVar getLinkVar1Idx(int parent, int child) {
          if (parent == 0) {
              return rootVars[child-1];
          } else {
              return childVars[parent-1][child-1];
          }
      }
docs: Get the link var corresponding to the specified parent and child position.
  
  @param parent The parent word position (1-indexed), or 0 to indicate the wall node.
  @param child The child word position (1-indexed).
  @return The link variable.