The inherent dimension of this geometric object, which must be less than or equal
to the coordinate dimension. In non-homogeneous collections, this will return the largest topological
dimension of the contained objects.

@return dimension
552745
public NumberExpression<Integer> dimension() {
        if (dimension == null) {
            dimension = Expressions.numberOperation(Integer.class, SpatialOps.DIMENSION, mixin);
        }
        return dimension;
    }
63535
public function getWidth(): int
    {
        $lines = [];
        foreach ($this as $line) {
            $lines[] = $line->getWidth();
        }

        return max($lines);
    }
922558
public function dimensionsAreMatchingTargetDimensionValues(): bool
    {
        $dimensions = $this->getDimensions();
        $contextDimensions = $this->context->getDimensions();
        foreach ($this->context->getTargetDimensions() as $dimensionName => $targetDimensionValue) {
            if (!isset($dimensions[$dimensionName])) {
                if ($targetDimensionValue === null) {
                    continue;
                } else {
                    return false;
                }
            } elseif ($targetDimensionValue === null && $dimensions[$dimensionName] === []) {
                continue;
            } elseif (!in_array($targetDimensionValue, $dimensions[$dimensionName], true)) {
                $contextDimensionValues = $contextDimensions[$dimensionName];
                $targetPositionInContext = array_search($targetDimensionValue, $contextDimensionValues, true);
                $nodePositionInContext = min(array_map(function ($value) use ($contextDimensionValues) {
                    return array_search($value, $contextDimensionValues, true);
                }, $dimensions[$dimensionName]));

                $val = $targetPositionInContext !== false && $nodePositionInContext !== false && $targetPositionInContext >= $nodePositionInContext;
                if ($val === false) {
                    return false;
                }
            }
        }

        return true;
    }
632325
public function dimensions()
	{
		if (!$this->dimensions)
		{
			$this->dimensions = array(0, 0);

			if ($this->isImage() && file_exists($this->path()))
			{
				$this->dimensions = getimagesize($this->path());
			}
		}

		return $this->dimensions;
	}
4423
public function getDimensions(): array
    {
        if ($this->dimensions === null) {
            $this->dimensions = getimagesize($this->file->getPathname());
        }

        return $this->dimensions;
    }
934078
private int getMaxStructSize() {
		final int leafSize = (createLeafNode().getStructMaxSize());
		final int internalSize = (createInternalNode().getStructMaxSize());
		return Math.max(leafSize, internalSize);
	}
291402
private Dimension getDefaultResolution() {
        if (getResolution() != null) {
            WebcamResolution res = WebcamResolution.valueOf(getResolution());
            return res.getSize();
        } else {
          return new Dimension(getWidth(), getHeight());   
        }
    }
140793
public int size ()
    {
        int size = 0;
        for (int ii = 0, ll = _keys.length; ii < ll; ii++) {
            if (_keys[ii] != -1) {
                size++;
            }
        }
        return size;
    }
105939
private static @Nullable Dimension getDimensionFromOriginal(@NotNull Rendition rendition) {
    Asset asset = rendition.getAsset();
    // asset may have stored dimension in different property names
    long width = getAssetMetadataValueAsLong(asset, TIFF_IMAGEWIDTH, EXIF_PIXELXDIMENSION);
    long height = getAssetMetadataValueAsLong(asset, TIFF_IMAGELENGTH, EXIF_PIXELYDIMENSION);
    return toDimension(width, height);
  }
891308
public static int getMemberDimension() throws XDocletException
    {
        if (getCurrentField() != null) {
            return getCurrentField().getDimension();
        }
        else if (getCurrentMethod() != null) {
            XMethod method = getCurrentMethod();

            if (MethodTagsHandler.isGetterMethod(method)) {
                return method.getReturnType().getDimension();
            }
            else if (MethodTagsHandler.isSetterMethod(method)) {
                XParameter param = (XParameter)method.getParameters().iterator().next();

                return param.getDimension();
            }
        }
        return 0;
    }
402780
private int chooseMaximalExtendedSplitAxis(List<? extends SpatialComparable> objects) {
    // maximum and minimum value for the extension
    int dimension = objects.get(0).getDimensionality();
    double[] maxExtension = new double[dimension];
    double[] minExtension = new double[dimension];
    Arrays.fill(minExtension, Double.MAX_VALUE);

    // compute min and max value in each dimension
    for (SpatialComparable object : objects) {
      for (int d = 0; d < dimension; d++) {
        double min, max;
        min = object.getMin(d);
        max = object.getMax(d);

        if (maxExtension[d] < max) {
          maxExtension[d] = max;
        }

        if (minExtension[d] > min) {
          minExtension[d] = min;
        }
      }
    }

    // set split axis to dim with maximal extension
    int splitAxis = -1;
    double max = 0;
    for (int d = 0; d < dimension; d++) {
      double currentExtension = maxExtension[d] - minExtension[d];
      if (max < currentExtension) {
        max = currentExtension;
        splitAxis = d;
      }
    }
    return splitAxis;
  }
1108668
public function getTopology() {
		$descriptor = new Descriptor($this->topologyTitle, self::TOPOLOGY_BACKEND);
		$descriptor->id = $this->getTopologyId();
		
		return $descriptor;
	}
1037648
public final int size() {
        int overallSize = 0;
        if (subSets != null) {
            for (int i = 0; i < subSets.length; i++) {
                overallSize = overallSize + subSets[i].size();
            }
        }
        return overallSize;
    }
553554
public Helix getByLargestContactsNotLowestAngle() {
		double contacts = 0;
		Helix lowest = getByLowestAngle();
		// TODO why are there helices with almost identical helix parameters??
		double angle = lowest.getAngle() + 0.05;
		Helix largest = null;
		for (Helix helix: helices) {
			if (helix == lowest) {
				continue;
			}
			if (helix.getContacts() > contacts && helix.getAngle() > angle) {
				contacts = helix.getContacts();
				largest = helix;
			}
		}
		if (largest == null) {
			return lowest;
		}
		return largest;
	}
334182
private static function fetchDimensions()
    {
        if (DIRECTORY_SEPARATOR === '\\') {
            $dimensions = static::getAnsiCon();
            if (!$dimensions) {
                $dimensions = static::getConsoleMode();
            }
        } else {
            $dimensions = static::getSttyColumns();
        }

        // Default, if above methods fail.
        $dimensions += [80, 50];

        static::$width = $dimensions[0];
        static::$height = $dimensions[1];

        // Reset signal handler flag.
        static::$pcntlNeedsUpdate = false;
    }
506052
public function getTopology() {
		$descriptor = new Descriptor('Frontend', self::TOPOLOGY_FRONTEND);
		
		if ($this->_namespace !== null) {
			$descriptor->namespace = $this->_namespace;
		}
		
		$descriptor->lifetime  = $this->_defaultLifetime;
		
		$backend = $this->getBackend();
		
		if ($backend instanceof TopologyInterface) {
			$descriptor[] = $backend->getTopology();
		}
		
		return $descriptor;
	}
1182227
public function getDepth(){

        if($this->depth === NULL){

            if($this->isRootNode()){
                $this->depth = -1;
            }
            else{
                $parents = [$this];
                $node = $this;
                while($parent = $node->parentNode()){
                    if(!$parent->isRootNode()){
                        $parents[] = $parent;
                    }
                    $node = $parent;
                }
                $this->depth = count($parents);
            }
        }

        return $this->depth;
    }