Generic function that will sum all columns of the given row, at the specified label's row.

@param $label
@param $row
@throws Exception if the the data row contains non numeric values
975708
public function sumMetrics($label, $row)
    {
        foreach ($row as $columnName => $columnValue) {
            if (empty($columnValue)) {
                continue;
            }
            if (empty($this->data[$label][$columnName])) {
                $this->data[$label][$columnName] = 0;
            }
            if (!is_numeric($columnValue)) {
                throw new Exception("DataArray->sumMetricsPivot expects rows of numeric values, non numeric found: " . var_export($columnValue, true) . " for column $columnName");
            }
            $this->data[$label][$columnName] += $columnValue;
        }
    }
816424
public String getCell(String row, String col) throws Exception {
		if (col.equals(this.getIndexColumnName())) {
			return row;
		}
		HeaderInfo rowIndex = rowLookup.get(row);
		HeaderInfo colIndex = columnLookup.get(col);

		if (rowIndex == null) {
			//allow for case insentive search
			for (String rowtable : rowLookup.keySet()) {
				if (row.equalsIgnoreCase(rowtable)) {
					rowIndex = rowLookup.get(rowtable);
					break;
				}
			}
			if (rowIndex == null) {
				throw new Exception("Row " + row + " not found in worksheet");
			}
		}
		if (colIndex == null) {
			//allow for case insentive search
			for (String coltable : columnLookup.keySet()) {
				if (col.equalsIgnoreCase(coltable)) {
					colIndex = columnLookup.get(coltable);
					break;
				}
			}
			if (colIndex == null) {
				throw new Exception("Column " + col + " not found in worksheet");
			}
		}

		CompactCharSequence ccs = data[rowIndex.getIndex()][colIndex.getIndex()];
		if (ccs != null) {
			return ccs.toString();
		} else {
			return "";
		}

		// return .toString();
	}
79943
private function checkCoords($col, $row)
    {
        if ($col < 0 || $col > 2) {
            throw new Exception\InvalidCoordsException('col', $col);
        }

        if ($row < 0 || $row > 2) {
            throw new Exception\InvalidCoordsException('row', $row);
        }
    }
1326549
protected function addColumn($column = '', $label = '')
    {
        $column = new Column($column, $label);
        $column->setGrid($this);

        return tap($column, function ($value) {
            $this->columns->push($value);
        });
    }
16536
public function onInput($row)
    {
        $keys = array_keys($row);
        $values = array_values($row);
        for ($i = 0; $i < count($keys); $i++) {
            if (isset($this->params[$keys[$i]])) {
                $keys[$i] = $this->params[$keys[$i]];
            }
        }
        $this->next(array_combine($keys, $values));
    }
833416
protected function getFieldRow($label)
    {
        return function($row) use($label) {
            if (is_null($row->value)) {
                return '---';
            }
            $value = array_get($row->value, $label);
            $class = ($value) ? 'success' : 'danger';
            $label = ($value) ? 'yes' : 'no';
            return '<span class = "label-basic label-basic--' . $class . '">' . trans('antares/foundation::messages.' . $label) . '</span >';
        };
    }
528998
public function render($row = null)
    {
        if (is_null($this->layout)) {
            throw new Exception('Unable to render fieldset layout. Layout is empty.');
        }
        $attributes = array_merge([
            'controls'   => $this->controls,
            'name'       => $this->name,
            'attributes' => $this->attributes,
            'row'        => $row,
            'legend'     => $this->legend], $this->params);

        return view($this->layout)->with($attributes);
    }
573010
synchronized public void addLabel(String label) {
        if (!labelMap.contains(label)) {
            labelMap.add(labelCounter++, label);
        }
    }
682685
private function tryWordInColumn($word, $col, $row)
    {
        $wordArray = Utils::stringToArray($word);

        foreach ($wordArray as $letter) {
            if ($this->grid[$row][$col] !== null &&
                $this->grid[$row][$col] !== $letter
            ) {
                return false;
            }
            $row++;
        }

        return true;
    }
369357
public void addField(String label,Element field)
    {
        if (label==null)
            label="&nbsp;";
        else
            label="<b>"+label+":</b>";

        if (extendRow)
        {
            column.add(field);
            extendRow=false;
        }
        else
        {
            column.newRow();
            column.addCell(label);
            column.cell().right();
        
            if (fieldAttributes != null)
            {
                column.addCell(field,fieldAttributes);
                fieldAttributes = null;
            }
            else
                column.addCell(field);
        }
    }
113565
public function addLabelColumn($labelColumn)
    {
        if (is_array($labelColumn)) {
            foreach ($labelColumn as $label) {
                $this->addLabelColumn($label);
            }
            return;
        }
        $this->labelColumns[$labelColumn] = true;
    }
45245
public function addRowWithCount($row, $writer, $rowNumber)
    {
        $exportRow   = $this->filterRow($row);
        $labeledCols = $this->getLabeledColumns();
        $exportRow   = array_replace(array_flip($labeledCols), $exportRow);
        $writer->addRow($exportRow);
    }
298886
protected function addLabel($dimension, $label)
    {
        if (!in_array($dimension, array(self::DIMENSION_X, self::DIMENSION_Y))) {
            throw new \InvalidArgumentException(sprintf("Value '%s' is not a valid dimension", $dimension));
        }

        $this->axis[$dimension][] = $label;
    }
323516
public function setLabel( $label )
	{
		if ( $label == $this->getLabel() ) { return; }

		$this->_values['label'] = (string) $label;
		$this->setModified();
	}
290276
public Cell addCell(Row row, String label) {
        Cell cell = new Cell(label);
        row.addChild(cell);
        return cell;
    }
1254181
public function withTargetRow(int $row): Notation
    {
        $notation = $this->getTargetColumn() . $row;

        return new self($notation);
    }
1103258
@Override
    public void setOutcome(int example, int label) {
        if (example > numExamples())
            throw new IllegalArgumentException("No example at " + example);
        if (label > numOutcomes() || label < 0)
            throw new IllegalArgumentException("Illegal label");

        INDArray outcome = FeatureUtil.toOutcomeVector(label, numOutcomes());
        getLabels().putRow(example, outcome);
    }