Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
SergySanJj committed Oct 10, 2018
1 parent ba9fb9b commit aad4864
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions GraphTree/Graph/include/Graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace GraphTree {
/** Returns new graph by value that contains spanning tree of the graph that has root at startVertex.
/// WARNING: numeration of vertexes might change.
/// Result graph will be homeomorphic to one of the
/// forest span trees obtained frop getSpanningTree().**/
/// forest span trees obtained from getSpanningTree().**/
Graph<T> getSpanningTree(std::size_t startVertex);

/* FRIEND */
Expand All @@ -116,7 +116,7 @@ namespace GraphTree {
void spanningDFS(Graph<T> &resGraph, std::vector<bool> &visited, std::size_t v);

/// Help function that runs DFS from v vertex and adds found spanning
/// tree connections and verticies into resGraph.
/// tree connections and vertexes into resGraph.
void singleSpanningDFS(Graph<T> &resGraph, std::vector<bool> &visited, std::size_t v);

/// Copy vertex data into .this graph from rhs, delete any data that was in .this.
Expand Down
18 changes: 9 additions & 9 deletions GraphTree/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ void intGraphSample() {
std::cout << "\n----intGraphSample----" << std::endl;

/// To work with Graph module use GraphTree namespace.
/// Then create graph object with 0 verticies that stores int values by:
/// Then create graph object with 0 vertexes that stores int values by:
GraphTree::Graph<int> g1(0);

/// If you want to crate graph object with n=10 verticies:
/// If you want to crate graph object with n=10 vertexes:
std::size_t n = 10;
GraphTree::Graph<int> g2(n);

Expand All @@ -78,12 +78,12 @@ void intGraphSample() {
g1 = g3;
g1 = g1;

/// To get number of verticies use:
/// To get number of vertexes use:
g1.size(); // will return 6
g2.size(); // will return 10
g3.size(); // will return 6

/// To add edge between two verticies u and v use:
/// To add edge between two vertexes u and v use:
/// WARNING: Graph doesn't support multiedges and loops
v = 1;
std::size_t u = 2;
Expand Down Expand Up @@ -114,7 +114,7 @@ void intGraphSample() {
std::cout << "\ng3 in number form:" << std::endl;
g3.print();

/// To print graph g3 djacency list with data stored in verticies
/// To print graph g3 adjacency list with data stored in vertexes
/// you first need to implement the function that will be called for each vertex
/// and print it in any form you want. As an example we use intPrintHelper() function.
/// After that use:
Expand All @@ -127,7 +127,7 @@ void intGraphSample() {
std::cout << "\nspanForestG3 in number form:" << std::endl;
spanForestG3.print();

/// To build random connection graph with n verticies use:
/// To build random connection graph with n vertexes use:
n = 10;
GraphTree::Graph<int> rndG = GraphTree::buildRandomGraph<int>(n);

Expand All @@ -144,7 +144,7 @@ void vectorGraphSample() {
/// -destructor
/// -assignment operator

/// Next sample shows how to use Graph that stores vectors as values in verticies:
/// Next sample shows how to use Graph that stores vectors as values in vertexes:
// innit with vector of vectors:
GraphTree::Graph<std::vector<int> > vecG({{1, 3, 3, 7},
{19, -91},
Expand Down Expand Up @@ -221,7 +221,7 @@ void DateTimeSample() {

/// To store date time difference use DateTimeDelta class
DT::DateTimeDelta toNY = dt3 - dt2;
/// Usage of DateTimeDelta clas:
/// Usage of DateTimeDelta class:
std::cout << "\nTo NY from 29/09/2018 10:25:56: ";
toNY.print();
std::cout << std::endl;
Expand Down Expand Up @@ -258,7 +258,7 @@ void DateGraphSample() {
DT::randomTime(startdt.getTime(), enddt.getTime())));
}

// iinit graph with dtVec.
// init graph with dtVec.
GraphTree::Graph<DT::DateTime> gDates(dtVec);
gDates.print(dateTimePrintHelper);

Expand Down

0 comments on commit aad4864

Please sign in to comment.