net.simplace.sim.components.experimental.intercropping.IntercroppingFunctions




public class IntercroppingFunctions {
// Public Constructors
public IntercroppingFunctions();


// Class Methods
public static Double[][] calcRowAndColSums(Double[][] m);

Calculates sum of rows, cols and total of a 2-dimensional array
returns Array of rowsums, colsums and total sum
public static Double[] getRowSums(Double[][] sums);

Retrieves the rowsums calculated by calcRowAndColSums
returns Array of rowsums
public static Double[] getColSums(Double[][] sums);

Retrieves the colums calculated by calcRowAndColSums
returns Array of colsums
public static Double getTotalSum(Double[][] sums);

Retrieves the total sum calculated by calcRowAndColSums
returns total sum
public static Double[][][] calcWeightsMatrix(Double[][] m);

Divides the elements of a matrix by its total sum and calculates row- and colsums.
returns weights matrix as well as weighted rowsums and colsums
public static Double[][] getWeightsMatrix(Double[][][] weights);

Retrieves the weights matrix
returns the 2-dimensional weighted matrix
public static Double[] getWeightsMatrixRow(Double[][][] weights, int row);

Retrieves a specific row from the weights matrix
returns a row from the weighted matrix
public static Double[] getWeightsRowsum(Double[][][] weights);

Retrieves the rowsums for a weight matrix
returns an 1-dimensional Array with sums for each row
public static Double[] getWeightsColsum(Double[][][] weights);

Retrieves the colsums for a weight matrix
returns an 1-dimensional Array with sums for each column
public static HashMap BelowgroundAllocationFactors(Double[] r1, Double[] r2);

Calculates belowground allocation factors from given root information per layer of two plants Root information can be root length density per layer or root restriction factor or any information that reflects root uptake capacity.
returns factors per layer as well as total factor for each plant
public static double calcViewFactor(double height, double width);

Calculates view factor
returns view factor
public static double calcSoilInterceptionFractionPath(double width_strip,
double width_path, double k, double lai, double height);

Calculates radiation fraction that is intercepted by the soil
returns fraction intercepted by the soil
public static double calcSoilInterceptionFractionStrip(double width_strip,
double width_path, double k, double lai, double height);

Calculates radiation fraction that is intercepted by the crop
returns fraction intercepted by the crop
public static double calcInterceptionFractionOneCrop(double width_strip,
double width_path, double k, double lai, double height);

Calculates radiation fraction that is intercepted by the crop if only one crop is present
returns fraction intercepted by the crop
public static Double[] calcInterceptionFractionsSorted(double width_1,
double space_1, double k_1, double lai_1, double height_1, double
width_2, double space_2, double k_2, double lai_2, double height_2);

Calculates radiation interception for two crops where height of first crop is bigger than of second
returns fractions as array with two entries
public static Double[] calcInterceptionFractions(double width_1, double
space_1, double k_1, double lai_1, double height_1, double width_2,
double space_2, double k_2, double lai_2, double height_2);

Calculates radiation interception fractions for two crops
returns fractions as array with two entries


}