Commit 9644198b authored by Fokion Zervoudakis's avatar Fokion Zervoudakis

Update Javadoc.

parent 3d9dbe56
......@@ -8,8 +8,7 @@ import java.util.Map;
/**
The adjacency list representation is preferred for sparse graphs.
<p>
Asymptotic analysis:
<p>Asymptotic analysis:
<ul>
<li>addEdge=O(1)
<li>removeEdge=O(E)
......
......@@ -9,8 +9,7 @@ import java.util.List;
The adjacency matrix representation is preferred for dense graphs or fast
lookups. It is also used because matrix algebra can efficiently compute
properties of the underlying graph.
<p>
Asymptotic analysis:
<p>Asymptotic analysis:
<ul>
<li>addEdge=O(1)
<li>removeEdge=O(1)
......
......@@ -8,9 +8,9 @@ import java.util.stream.IntStream;
class AlgorithmR {
/**
Uses Algorithm R to uniformly select a random element from {@code A}.
<p>
Asymptotic analysis:
Uses Algorithm R to uniformly select a random element from {@code A} (a.k.a
reservoir sampling).
<p>Asymptotic analysis:
<ul>
<li>time_worst=O(n)
<li>space_worst=O(1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment