Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7bd16cc191
@ -86,9 +86,14 @@ public class AccessPoint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void analyseData() throws IOException {
|
private void analyseData() throws IOException {
|
||||||
FileOutputStream file = new FileOutputStream("data.csv", true);
|
try(FileOutputStream file = new FileOutputStream("data.csv", true)) {
|
||||||
// file.write("data1;data2".getBytes());
|
for(int i = 0; i < frame.length; i++) {
|
||||||
file.close();
|
for(int j = 0; j < frame[i].length; j++) {
|
||||||
|
ResourceBlock ur = frame[i][j];
|
||||||
|
file.write((i + ";" + j + ";" + this.users.indexOf(ur.getUser()) + ";" + ur.getBandwidth() + ";\n").getBytes());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void plotData() {
|
private void plotData() {
|
||||||
|
@ -2,18 +2,26 @@ package fr.ntr;
|
|||||||
|
|
||||||
public class ResourceBlock {
|
public class ResourceBlock {
|
||||||
private User user;
|
private User user;
|
||||||
private double bandwith;
|
private double bandwidth;
|
||||||
|
|
||||||
public ResourceBlock (User user, double bandwith) {
|
public ResourceBlock (User user, double bandwidth) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
this.bandwith = bandwith;
|
this.bandwidth = bandwidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUser(User user) {
|
public void setUser(User user) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBandwith(double bandwith) {
|
public void setBandwidth(double bandwidth) {
|
||||||
this.bandwith = bandwith;
|
this.bandwidth = bandwidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User getUser() {
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getBandwidth() {
|
||||||
|
return bandwidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user