Skip to content

Commit 70b7bef

Browse files
committed
Remove using namespace std; from header
An obvious clean-up but also fix to avoid Windows API ambiguities (e.g. byte vs std::byte)
1 parent 0972ffa commit 70b7bef

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Hungarian.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <cmath> // for fabs()
1515
#include "Hungarian.h"
1616

17+
using namespace std;
1718

1819
HungarianAlgorithm::HungarianAlgorithm(){}
1920
HungarianAlgorithm::~HungarianAlgorithm(){}

Hungarian.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
#include <iostream>
1616
#include <vector>
1717

18-
using namespace std;
1918

2019

2120
class HungarianAlgorithm
2221
{
2322
public:
2423
HungarianAlgorithm();
2524
~HungarianAlgorithm();
26-
double Solve(vector <vector<double> >& DistMatrix, vector<int>& Assignment);
25+
double Solve(std::vector <std::vector<double> >& DistMatrix, std::vector<int>& Assignment);
2726

2827
private:
2928
void assignmentoptimal(int *assignment, double *cost, double *distMatrix, int nOfRows, int nOfColumns);

testMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <iostream>
22
#include "Hungarian.h"
3-
3+
using namespace std;
44

55
int main(void)
66
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy