Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gs-algo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
graphstream
gs-algo
Commits
b65ee66f
Commit
b65ee66f
authored
May 13, 2012
by
sbalev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quick fix for #60.
I leave it open, all this modularity stuff needs to be rewritten.
parent
f1b4622a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
src/org/graphstream/algorithm/Toolkit.java
src/org/graphstream/algorithm/Toolkit.java
+15
-7
No files found.
src/org/graphstream/algorithm/Toolkit.java
View file @
b65ee66f
...
...
@@ -732,13 +732,21 @@ public class Toolkit extends
double
sumE
=
0
,
Tr
=
0
;
double
communityCount
=
E
.
length
;
for
(
int
y
=
0
;
y
<
communityCount
;
++
y
)
{
for
(
int
x
=
y
;
x
<
communityCount
;
++
x
)
{
if
(
x
==
y
)
Tr
+=
E
[
x
][
y
];
sumE
+=
E
[
x
][
y
]
*
E
[
x
][
y
];
}
// for (int y = 0; y < communityCount; ++y) {
// for (int x = y; x < communityCount; ++x) {
// if (x == y)
// Tr += E[x][y];
//
// sumE += E[x][y] * E[x][y];
// }
// }
for
(
int
i
=
0
;
i
<
communityCount
;
i
++)
{
Tr
+=
E
[
i
][
i
];
double
a
=
0
;
for
(
int
j
=
0
;
j
<
communityCount
;
j
++)
a
+=
E
[
i
][
j
];
sumE
+=
a
*
a
;
}
return
(
Tr
-
sumE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment