Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
GraphTheory[RandomGraphs][AssignEdgeWeights]
Calling Sequence
AssignEdgeWeights(G,m..n)
AssignEdgeWeights(G,a..b)
AssignEdgeWeights(G,R)
Parameters
G
-
graph
m, n
integers satisfying n >= m
a, b
floats satisfying b >= a
R
user defined function for generating random edge weights
Description
If G is a weighted graph, AssignEdgeWeights(G,...) assigns new random edge weights to G, i.e., for each edge (i,j) in G the (i,j)'th entry in the weight matrix of G is updated inplace.
If G is an unweighted graph, a weighted graph is first created before assigning the edge weights. The structure of G is not copied.
AssignEdgeWeights(G,m..n) assigns the edges of the weighted graph random integer weights uniformly distributed on [m,n].
AssignEdgeWeights(G,a..b) assigns the edges of the weighted graph random decimal weights uniformly distributed on [a,b).
AssignEdgeWeights(G,R) assigns the edges of the weighted graph G values defined by R(). The Maple procedure R must return numerical values, i.e., integers, rationals, or floating point constants.
The random number generator used to compute the edge weights can be seeded using the randomize function.
Examples
This example creates a network
B := proc() if U()=1 then 1 else 2 fi end:
So Prob(B=1)=1/4, Prob(B=2)=3/4
See Also
GraphTheory[Graph], GraphTheory[MakeWeighted], GraphTheory[WeightMatrix], RandomTree
Download Help Document