random_distribuitions 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

random_distributions #

Pub Package

This is a Library for Dart to generate random numbers usings N distributions, like uniform, normal.

Import #

Use this command to impor the library in your program.

import 'package:random_distribuitions/src/random.dart';

Example #

library random_distribuitions;

import 'package:random_distribuitions/src/random.dart';

void main(){

  var testUniform = random();



Uniform #

This is the first function that we have, we generate random numbers when a <= x <= b, 1/(b-a)

library random_distribuitions;

import 'package:random_distribuitions/src/random.dart';

void main(){

  var testUniform = random();// call the random class

  print(testUniform.uniform(1,2));// a = 1 and b = 2


Expovariate #

This is a distribution using exponential distribuition, -(log(uniform)/lambda)

library random_distribuitions;

import 'package:random_distribuitions/src/random.dart';

void main(){

  var rand = new random();//call the random class

  print(rand.expovariate(3));//3 is the lambda


0.1.0 #

  • Added example files

0.0.2 #

  • Changed some files and fixed bugs

0.0.1 #

  • Added expovariate and uniform distributions


library random_distribuitions;

import 'package:random_distribuitions/src/random.dart';

void main(){

  var testUniform = random();


  var rand = new random();



Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  random_distribuitions: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:random_distribuitions/random_distribuitions.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Oct 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:random_distribuitions/random_distribuitions.dart.

Health issues and suggestions

Document public APIs. (-1 points)

5 out of 5 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/random_distribuitions.dart.

Run dartfmt to format lib/random_distribuitions.dart.

Format lib/src/random.dart.

Run dartfmt to format lib/src/random.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0