Takes a HashMap mapping column names to doubles.
<p>
Looks up the column names needed by the model, and places the doubles into the data array in
the order needed by the model. Missing columns use NaN.
</p>
429735
public double[] map( Map<String, Double> row, double data[] ) {
    String[] colNames = getNames();
    for( int i=0; i<colNames.length-1; i++ ) {
      Double d = row.get(colNames[i]);
      data[i] = d==null ? Double.NaN : d;
    }
    return data;
  }
1185610
private Map<String, Integer> createMapOfColumnIndex(String[] columns)
    {
        int i = 0;
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String column : columns)
        {
            map.put(column, i++);
        }
        return map;
    }
395984
public double[] getColumn(int col) {
    double[] column = new double[numRows];
    int offset = translate(0, col, numRows);
    for (int i = 0; i < column.length; i++) {
      column[i] = matrix[offset + i];
    }
    return column;
  }
1361046
@Override
    public Map<String, String> mapToColumns(Tuple tuple) {
        Fields fields = tuple.getFields();
        Map<String, String> columns = new HashMap<String, String>();
        for (int i = 0; i < fields.size(); i++) {
            String name = fields.get(i);
            Boolean isRowField = Arrays.asList(this.rowKeyFields).contains(name);
            if (!isRowField) {
                Object value = tuple.getValueByField(name);
                columns.put(name, (value != null ? value.toString() : ""));
            }
        }
        return columns;
    }
1129275
public Values<V> values () {
		if (values1 == null) {
			values1 = new OrderedMapValues(this);
			values2 = new OrderedMapValues(this);
		}
		if (!values1.valid) {
			values1.reset();
			values1.valid = true;
			values2.valid = false;
			return values1;
		}
		values2.reset();
		values2.valid = true;
		values1.valid = false;
		return values2;
	}
1123973
public static Map<String, Object> replaceDataReferences(final Map<String, Object> input,
                                                             final Map<String, Map<String, String>> data,
                                                            Converter<String, String> converter,
                                                            boolean failIfUnexpanded,
                                                            boolean blankIfUnexpanded
    )
    {
        final HashMap<String, Object> output = new HashMap<>();
        for (final String s : input.keySet()) {
            Object o = input.get(s);
            output.put(s, replaceDataReferencesInObject(o, data, converter, failIfUnexpanded, blankIfUnexpanded));
        }
        return output;
    }
1023854
public String[] getLocalColumns(String modelName) {
		List<String> columnList = new ArrayList<String>();
		for(int i = 0; i < this.hasOne.length; i++){
			if(modelName.equalsIgnoreCase(this.hasOne[i])){
				columnList.add(hasOneLocalColumn[i]);
			}
		}
		for(int j = 0; j < this.hasMany.length; j++){
			if(modelName.equalsIgnoreCase(hasMany[j])){
				columnList.add(hasManyLocalColumn[j]);
			}
		}
		if(columnList.size() == 0){
			return null;
		}
		return columnList.toArray(new String[columnList.size()]);
	}
28538
public Object[] valuesForColumns(T bo, String... columns) {
        Map<String, ColAttrMapping> columnAttributeMappings = getColumnAttributeMappings();
        Object[] result = new Object[columns.length];
        for (int i = 0; i < columns.length; i++) {
            ColAttrMapping colAttrMapping = columnAttributeMappings.get(columns[i]);
            try {
                result[i] = colAttrMapping != null ? colAttrMapping.extractAttrValue(bo) : null;
            } catch (Exception e) {
                throw e instanceof RuntimeException ? (RuntimeException) e
                        : new RuntimeException(e);
            }
        }
        return result;
    }
863435
private Map<String, Object> sortColumns(Map<String, Object> next) {
		Map<String, Object> sortedColumns = new LinkedHashMap<>();
		if ( this.columns != null ) {
			for ( String column : this.columns ) {
				sortedColumns.put( column, next.get( column ) );
			}
		}
		return sortedColumns;
	}
703376
@Override
    public List<Column> getColumns(List<String> columnNames) {
        if (columnsByName.isEmpty()) {
            Map<String, Column> columnsMap = new HashMap<String, Column>();
            List<Column> allColumns = sasFileParser.getColumns();
            for (Column column : allColumns) {
                columnsMap.put(column.getName(), column);
            }
            for (String name : columnNames) {
                if (columnsMap.containsKey(name)) {
                    columnsByName.add(columnsMap.get(name));
                } else {
                    throw new NoSuchElementException(UNKNOWN_COLUMN_NAME);
                }
            }
        }
        return columnsByName;
    }
99745
def to_java_doubles(m):
    '''
    
    '''
    global _java
    if _java is None: _init_registration()
    m = np.asarray(m)
    dims = len(m.shape)
    if dims > 2: raise ValueError('1D and 2D arrays supported only')
    bindat = serialize_numpy(m, 'd')
    return (_java.jvm.nben.util.Numpy.double2FromBytes(bindat) if dims == 2
            else _java.jvm.nben.util.Numpy.double1FromBytes(bindat))
1114763
private void splitOn(String... columnNames) {

        List<Column<?>> columns = getSourceTable().columns(columnNames);
        int byteSize = getByteSize(columns);

        byte[] currentKey = null;
        String currentStringKey = null;
        TableSlice view;

        Selection selection = new BitmapBackedSelection();

        for (int row = 0; row < getSourceTable().rowCount(); row++) {

            ByteBuffer byteBuffer = ByteBuffer.allocate(byteSize);
            String newStringKey = "";

            for (int col = 0; col < columnNames.length; col++) {
                if (col > 0) {
                    newStringKey = newStringKey + SPLIT_STRING;
                }

                Column<?> c = getSourceTable().column(columnNames[col]);
                String groupKey = getSourceTable().getUnformatted(row, getSourceTable().columnIndex(c));
                newStringKey = newStringKey + groupKey;
                byteBuffer.put(c.asBytes(row));
            }
            byte[] newKey = byteBuffer.array();
            if (row == 0) {
                currentKey = newKey;
                currentStringKey = newStringKey;
            }
            if (!Arrays.equals(newKey, currentKey)) {
                currentKey = newKey;
                view = new TableSlice(getSourceTable(), selection);
                view.setName(currentStringKey);
                currentStringKey = newStringKey;
                addSlice(view);
                selection = new BitmapBackedSelection();
                selection.add(row);
            } else {
                selection.add(row);
            }
        }
        if (!selection.isEmpty()) {
            view = new TableSlice(getSourceTable(), selection);
            view.setName(currentStringKey);
            addSlice(view);
        }
    }
997905
public static double[] rowSums(double[][] data) {
        double[] x = new double[data.length];

        for (int i = 0; i < x.length; i++) {
            x[i] = sum(data[i]);
        }

        return x;
    }
260498
@Override
	public Map<String, Object> getValues(double evaluationTime, Model model) {
		Map<String, Object> results;
		if(model instanceof MonteCarloSimulationModel) {
			try {
				results = getValues(evaluationTime, (MonteCarloSimulationModel)model);
			} catch (CalculationException e) {
				results = new HashMap<>();
				results.put("exception", e);
			}
		}
		else {
			Exception e = new IllegalArgumentException("The product " + this.getClass()
			+ " cannot be valued against a model " + model.getClass() + "."
			+ "It requires a model of type " + MonteCarloSimulationModel.class + ".");
			results = new HashMap<>();
			results.put("exception", e);
		}

		return results;
	}
395669
public static List<Column> toColumn(List<String> columns) {
        List<Column> ret = new ArrayList<>();
        for (String s : columns)
            ret.add(col(s));
        return ret;
    }
563732
@Override
    public String[] outputColumnNames() {
        List<String> columnNames = inputSchema.getColumnNames();
        columnNames.add(newColumnName);
        return columnNames.toArray(new String[columnNames.size()]);
    }
1028318
public void transform(double data[], int rowspan) {
    checkData(data,rowspan);
    for(int i=0; i<nrows; i++){
      rowFFT.transform(data,i*rowspan,2); }
    for(int j=0; j<ncols; j++){
      colFFT.transform(data,2*j,rowspan); }}