object GeometricRandom
Factory object to create a geometric random graph.
The idea is to generate positions for the nodes uniformly at random in a 1 x 1 square plane. Then, given a radius r, two nodes are neighbors iff. their Euclidean distance is less than r.
The critical radius is calculated from the following formula (linked to percolation theory):
val r = math.sqrt( (math.log(N) + alpha) / (math.Pi * N))
where alpha is an adjustment parameter to increase the likelihood that the resulting graph is connected.
- Alphabetic
- By Inheritance
- GeometricRandom
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(n: Int): Graph[Int, UnDiEdge]
- def apply(n: Int, alpha: Double): Graph[Int, UnDiEdge]
-
def
apply(range: Range, alpha: Double = 0): Graph[Int, UnDiEdge]
Generates a geometric random graph, in which nodes are randomly positioned on the plane, and an edge exists between two nodes only if their distance is less than some chosen constant.
Generates a geometric random graph, in which nodes are randomly positioned on the plane, and an edge exists between two nodes only if their distance is less than some chosen constant.
- range
the range of process numbers on which to generate the random graph.
- alpha
parameter to increase the likelihood that the resulting graph is connected.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )