Ronan

942 Reputation

14 Badges

11 years, 358 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are questions asked by Ronan

This is really a question on getting index positions of a sub list from the main list.

Have a list of Vertices and a list of populations for each vertes.

Then from the Neighbours list I need the respective positions in the Vertex list to sum to corresponding values from the population list.

2nd Question  Can the population values be displayed near its vertex or in the vertes circle? e.g y=5

restart

NULL

with(GraphTheory)

with(SpecialGraphs)

Vs := [x, y, z, w]

[x, y, z, w]

Popvs := [-2, 1, 6, 3]

[-2, 1, 6, 3]

newPopsvs := Popvs

[-2, 1, 6, 3]

``

X := Graph(Vs)

GRAPHLN(undirected, unweighted, [x, y, z, w], Array(1..4, {(1) = {}, (2) = {}, (3) = {}, (4) = {}}), `GRAPHLN/table/1`, 0)

``

AddEdge(X, {{w, y}, {w, z}, {x, y}, {y, z}})

GRAPHLN(undirected, unweighted, [x, y, z, w], Array(1..4, {(1) = {2}, (2) = {1, 3, 4}, (3) = {2, 4}, (4) = {2, 3}}), `GRAPHLN/table/1`, 0)

Nbs := [seq(Neighbors(X, Vs[i]), i = 1 .. nops(Vs))]

[[y], [x, z, w], [y, w], [y, z]]

``

vp := [[0, 0], [1, 0], [1.5, 1], [2, 0]]

[[0, 0], [1, 0], [1.5, 1], [2, 0]]

SetVertexPositions(X, vp)

DrawGraph(X)

k := rand(1 .. 4)

NULL

for c to nops(Nbs) do Nbs[c]; select(proc (i) options operator, arrow; Vs[i] = Nbs[c, 1 .. -1] end proc, [`$`(1 .. nops(Vs))]) end do

[]

NULL

Download Q_23-12-22_Test_Graph_indices_.mw

I have in internal procedure ppp that has an input prjpsn:=3. This set a Vector positions of x,y,z to either if prjpsn=1 

zpsn=1,   xpsn=2,  ypsn=3

or if prjpsn =3   

xpsn=1,   ypsn=2, zpsn=3

This then are used in another procedure. I can't get the values to transfere.  prjpsn would default to 3 in the module but can be set externally to 1 if needed.
The relevant parts are highlighted in green text. Cant get the worksheet to display.

Maple Worksheet - Errorprjpsn:=3


Failed to load the worksheet /maplenet/convert/Q_14-12-22_Module_internal_settings.mw .

Download Q_14-12-22_Module_internal_settings.mw

I am trying to use the perpendicular symbol ⊥ as a superscript. Can this be done? For somereason the document will not displat?