exp method Null safety

  1. @override
void exp()
override

Calculates exponent for each element.

Element i is calculated with the formula:

exp(x[i]);

Implementation

@override
void exp() {
  final elements = this.elements;
  final n = length;
  for (var i = 0; i < n; i++) {
    elements[i] = math.exp(elements[i]);
  }
}