Recursive method to get the sub dimension.

@param _facets the facets
@param _dimValue the _dim value
@param _dim the _dim
@param _path the _path
@throws IOException Signals that an I/O exception has occurred.
500467
private void addSubDimension(final Facets _facets,
                                 final DimValue _dimValue,
                                 final String _dim,
                                 final String _path)
        throws IOException
    {
        final FacetResult result = _facets.getTopChildren(1000, _dim, _path);
        if (result != null) {
            LOG.debug("FacetResult {}.", result);
            for (final LabelAndValue labelValue : result.labelValues) {
                final DimValue dimValue = new DimValue().setLabel(labelValue.label)
                                .setValue(labelValue.value.intValue());
                dimValue.setPath(ArrayUtils.addAll(_dimValue.getPath(), result.path));
                _dimValue.getChildren().add(dimValue);
                addSubDimension(_facets, dimValue, _dim, _path + "/" + labelValue.label);
            }
        }
    }
405817
private StringBuilder renderFacets() throws IOException {

		StringBuilder sb = new StringBuilder();
		if( ! this.applicationTemplate.getGraphs().getFacetNameToFacet().isEmpty()) {

			sb.append( renderTitle1( this.messages.get( "facets" ))); //$NON-NLS-1$
			sb.append( renderParagraph( this.messages.get( "facets.intro" ))); //$NON-NLS-1$

			List<String> sectionNames = new ArrayList<> ();
			List<Facet> allFacets = new ArrayList<>( this.applicationTemplate.getGraphs().getFacetNameToFacet().values());
			Collections.sort( allFacets, new AbstractTypeComparator());

			for( Facet facet : allFacets ) {

				// Start a new section
				final String sectionName = DocConstants.SECTION_FACETS + facet.getName();
				StringBuilder section = startSection( sectionName );

				// Overview
				section.append( renderTitle2( facet.getName()));

				String customInfo = readCustomInformation( this.applicationDirectory, facet.getName(), DocConstants.FACET_DETAILS );
				if( Utils.isEmptyOrWhitespaces( customInfo ))
					customInfo = this.typeAnnotations.get( facet.getName());

				if( ! Utils.isEmptyOrWhitespaces( customInfo )) {
					section.append( renderTitle3( this.messages.get( "overview" ))); //$NON-NLS-1$
					section.append( renderParagraph( customInfo ));
				}

				// Exported variables
				Map<String,String> exportedVariables = ComponentHelpers.findAllExportedVariables( facet );
				section.append( renderTitle3( this.messages.get( "exports" ))); //$NON-NLS-1$
				if( exportedVariables.isEmpty()) {
					String msg = MessageFormat.format( this.messages.get( "facet.no.export" ), facet ); //$NON-NLS-1$
					section.append( renderParagraph( msg ));

				} else {
					String msg = MessageFormat.format( this.messages.get( "facet.exports" ), facet ); //$NON-NLS-1$
					section.append( renderParagraph( msg ));
					section.append( renderList( convertExports( exportedVariables )));
				}

				// End the section
				section = endSection( sectionName, section );
				sb.append( section );
				sectionNames.add( sectionName );
			}

			sb.append( renderSections( sectionNames ));
		}

		return sb;
	}
637291
public void insert_ul(final int[] argin, final int dim_x, final int dim_y) {
	attrval.r_dim.dim_x = dim_x;
	attrval.r_dim.dim_y = dim_y;
	DevVarULongArrayHelper.insert(attrval.value, argin);
    }
1036097
def sub2ind(indices, dimensions):
    
    # check that none of the indices exceeds the size of the array
    if any([i > j for i, j in zip(indices, dimensions)]):
        raise RuntimeError("sub2ind:an index exceeds its dimension's size")
    dims = list(dimensions)
    dims.append(1)
    dims.remove(dims[0])
    dims.reverse()
    ind  = list(indices)
    ind.reverse()
    idx = 0
    mult = 1
    for (cnt, dim) in zip(ind, dims):
        mult = dim*mult
        idx = idx + (cnt-1)*mult    
    return idx
457735
protected N buildSpanningTree(int dim, double[] mat, Layout layout) {
    assert (layout.edges == null || layout.edges.size() == 0);
    int[] iedges = PrimsMinimumSpanningTree.processDense(mat, new LowerTriangularAdapter(dim));
    int root = findOptimalRoot(iedges);

    // Convert edges:
    ArrayList<Edge> edges = new ArrayList<>(iedges.length >> 1);
    for(int i = 1; i < iedges.length; i += 2) {
      edges.add(new Edge(iedges[i - 1], iedges[i]));
    }
    layout.edges = edges;

    // Prefill nodes array with nulls.
    ArrayList<N> nodes = new ArrayList<>(dim);
    for(int i = 0; i < dim; i++) {
      nodes.add(null);
    }
    layout.nodes = nodes;
    N rootnode = buildTree(iedges, root, -1, nodes);

    return rootnode;
  }
228007
private Path[] listPaths(final Path path)
      throws IOException {
    Path[] children = null;
    ArrayList<Path> tmpChildrenPath = new ArrayList<>();
    if (fs.isDirectory(path)) {
      // Get children's path list.
      FileStatus[] chiledrenFileStatus = pathFilter == null ? fs.listStatus(path) : fs.listStatus(path, pathFilter);
      for (FileStatus childFileStatus : chiledrenFileStatus) {
        tmpChildrenPath.add(childFileStatus.getPath());
      }
      children = tmpChildrenPath.toArray(new Path[tmpChildrenPath.size()]);
    }
    if (children == null) {
      children = EMPTY_PATH_ARRAY;
    }
    if (comparator != null && children.length > 1) {
      Arrays.sort(children, comparator);
    }
    return children;
  }
702435
@Override
  public boolean delete(Path path, boolean recursive) throws IOException {
    LOG.debug("delete({}, {})", path, recursive);
    if (mStatistics != null) {
      mStatistics.incrementWriteOps(1);
    }
    AlluxioURI uri = new AlluxioURI(HadoopUtils.getPathWithoutScheme(path));
    DeletePOptions options = DeletePOptions.newBuilder().setRecursive(recursive).build();
    try {
      mFileSystem.delete(uri, options);
      return true;
    } catch (InvalidPathException | FileDoesNotExistException e) {
      LOG.warn("delete failed: {}", e.getMessage());
      return false;
    } catch (AlluxioException e) {
      throw new IOException(e);
    }
  }
1285593
def get_tile_dims(tile_dims, imshape):
    

    if tile_dims is None:
        td = None
    else:
        td = numpy.array(tile_dims, dtype='i8')
        nd = len(imshape)
        if td.size != nd:
            msg = "expected tile_dims to have %d dims, got %d" % (td.size, nd)
            raise ValueError(msg)

    return td
484789
def get(self,dimlist):
        '''
        
        '''
        out=()
        for i,d in enumerate(dimlist):
            out+=(super(dimStr, self).get(d,None),)
         
        return out
710600
def all_dims(self):
        """"""
        return [
            _get_dims(arr) if not isinstance(arr, ArrayList) else
            arr.all_dims
            for arr in self]
357091
private IntIterator getCommonSplitDimensions(N node) {
    Collection<SplitHistory> splitHistories = new ArrayList<>(node.getNumEntries());
    for(int i = 0; i < node.getNumEntries(); i++) {
      SpatialEntry entry = node.getEntry(i);
      if(!(entry instanceof XTreeDirectoryEntry)) {
        throw new RuntimeException("Wrong entry type to derive split dimension from: " + entry.getClass().getName());
      }
      splitHistories.add(((XTreeDirectoryEntry) entry).getSplitHistory());
    }
    return SplitHistory.getCommonDimensions(splitHistories);
  }
585476
def dimensions(filenames):
    """"""

    single = type(filenames) is str
    if single:
        filenames = [filenames]
    dims = get_dimensions(filenames)
    if single:
        dims = dims[0]
    return dims
984590
@Nullable
  protected ObjectListingChunk getObjectListingChunkForPath(String path, boolean recursive)
      throws IOException {
    // Check if anything begins with <folder_path>/
    String dir = stripPrefixIfPresent(path);
    ObjectListingChunk objs = getObjectListingChunk(dir, recursive);
    // If there are, this is a folder and we can create the necessary metadata
    if (objs != null && ((objs.getObjectStatuses() != null && objs.getObjectStatuses().length > 0)
        || (objs.getCommonPrefixes() != null && objs.getCommonPrefixes().length > 0))) {
      // If the breadcrumb exists, this is a no-op
      if (!mUfsConf.isReadOnly()) {
        mkdirsInternal(dir);
      }
      return objs;
    }
    return null;
  }
867641
function getUiInfo(infos, dimension) {
        if (dimension.values.length > 0) {

            var infosMaxIndex = infos.length - 1;
            var lastInfosArray = infos[infosMaxIndex];
            var parent = lastInfosArray.length > 0 ? lastInfosArray[lastInfosArray.length - 1] : null;

            for (var valIndex = 0; valIndex < dimension.values.length; valIndex++) {
                var subvalue = dimension.values[valIndex];
                var subdim = dimension.subdimvals[subvalue];

                var subTotalHeader;
                if (!subdim.isLeaf && subdim.field.subTotal.visible) {
                    subTotalHeader = new uiheaders.header(axe.Type.ROWS, uiheaders.HeaderType.SUB_TOTAL, subdim, parent, self.dataFieldsCount());
                } else {
                    subTotalHeader = null;
                }

                var newHeader = new uiheaders.header(axe.Type.ROWS, null, subdim, parent, self.dataFieldsCount(), subTotalHeader);

                if (valIndex > 0) {
                    infos.push((lastInfosArray = []));
                }

                lastInfosArray.push(newHeader);

                if (!subdim.isLeaf) {
                    getUiInfo(infos, subdim);
                    if (subdim.field.subTotal.visible) {
                        infos.push([subTotalHeader]);

                        // add sub-total data headers if more than 1 data field and they will be the leaf headers
                        addDataHeaders(infos, subTotalHeader);
                    }
                } else {
                    // add data headers if more than 1 data field and they will be the leaf headers
                    addDataHeaders(infos, newHeader);
                }
            }
        }
    }
81147
function (subpath) {
    var value = this.sub(subpath).get();
    return Imm.Iterable.isIterable(value) ? value.toJS() : value;
  }
1132516
def read_keys(self, keys, dict_cls=AttrDict, path="/"):
        
        od = dict_cls()
        for k in keys:
            try:
                # Try to read a variable.
                od[k] = self.read_value(k, path=path)
            except self.Error:
                try:
                    # Try to read a dimension.
                    od[k] = self.read_dimvalue(k, path=path)
                except self.Error:
                    od[k] = None

        return od
573201
public static int nvgraphWidestPath(
        nvgraphHandle handle, 
        nvgraphGraphDescr descrG, 
        long weight_index, 
        Pointer source_vert, 
        long widest_path_index)
    {
        return checkResult(nvgraphWidestPathNative(handle, descrG, weight_index, source_vert, widest_path_index));
    }