コード例 #1
0
vector<float> DiscreteJacobianField::DomainSize(const Array<Matrix> & jacobian_array, const float cell_size)
{
    vector<float> domain_size(jacobian_array.Dimension());

    for(unsigned int i = 0; i < domain_size.size(); i++)
    {
        domain_size[i] = jacobian_array.Size(i)*cell_size;
    }

    return domain_size;
}
コード例 #2
0
vector<float> DiscreteDiffDistribution::DiffDomainMax(const Array<float> & distribution, const float cell_size, const vector<float> & diff_domain_min)
{
    if(distribution.Dimension() != diff_domain_min.size())
    {
        throw Exception(" DiscreteDiffDistribution::DiffDomainMax(): dimension mismatch");
    }

    vector<float> diff_domain_max(diff_domain_min);

    for(unsigned int i = 0; i < diff_domain_max.size(); i++)
    {
        diff_domain_max[i] = diff_domain_min[i] + cell_size*distribution.Size(i);
    }

    return diff_domain_max;
}