Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
Discrete Optimization Library
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bachelorarbeit
Discrete Optimization Library
Commits
3cb93a32
Commit
3cb93a32
authored
Nov 21, 2020
by
Jonas Seidel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph Selectors cont + Graph out fix + Switch to attribute from set indexing
parent
34e61191
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
Graphtheory/Graph.cpp
Graphtheory/Graph.cpp
+1
-0
Graphtheory/Graph_fringe_operations.ipp
Graphtheory/Graph_fringe_operations.ipp
+1
-1
Specialization/LP_Problems/maintenance_problem_generator.cpp
Specialization/LP_Problems/maintenance_problem_generator.cpp
+4
-4
No files found.
Graphtheory/Graph.cpp
View file @
3cb93a32
...
...
@@ -2,6 +2,7 @@
#include "Graph.ipp"
#include "Graph_fringe_operations.ipp"
#include "Graph_select_operations.ipp"
#include "Graph_path_operations.ipp"
#include "Graph_special_members_and_operators.ipp"
#include "Graph_advanced.ipp"
...
...
Graphtheory/Graph_fringe_operations.ipp
View file @
3cb93a32
...
...
@@ -60,7 +60,7 @@ Node* Graph::tip_sources(random_attribute_generator edge_attribute_generator, ra
s = this->add_node(name.str(), node_attribute_generator.next());
for(Node* n : sources){
std::stringstream name;
name <<
n->description() << "_" << s
->description();
name <<
s->description() << "_" << n
->description();
this->add_edge(s, n, name.str(), edge_attribute_generator.next());
}
}else if(sources.size() == 1){
...
...
Specialization/LP_Problems/maintenance_problem_generator.cpp
View file @
3cb93a32
...
...
@@ -10,19 +10,19 @@ maintenance_problem_generator::maintenance_problem_generator(random_graph_genera
Maintenance_Problem
maintenance_problem_generator
::
next
(){
std
::
pair
<
std
::
pair
<
Node
*
,
Node
*>
,
Graph
>
stg
=
this
->
_graph_generator
.
next_acyclic_2_tips
();
std
::
set
<
Edge
*>
critical_edges
;
random_set_element_generator
<
Edge
*>
set_gen
(
&
stg
.
second
.
edges
());
for
(
size_t
i
=
0
;
i
<
this
->
_number_of_critical_edges
;
i
++
){
Edge
*
curr
=
set_gen
.
next
();
while
(
critical_edges
.
find
(
curr
)
!=
critical_edges
.
end
()){
auto
attribute_search
=
curr
->
attribute
(
"Selected"
);
while
(
!
attribute_search
.
first
){
set_gen
>>
curr
;
attribute_search
=
curr
->
attribute
(
"Selected"
);
}
critical_edges
.
insert
(
curr
);
curr
->
attribute_throwing
(
"Selected"
).
value
()
=
true
;
}
return
Maintenance_Problem
(
stg
.
second
,
stg
.
first
.
first
,
stg
.
first
.
second
,
critical_edges
,
this
->
_length_of_interval
);
return
Maintenance_Problem
(
stg
.
second
,
stg
.
first
.
first
,
stg
.
first
.
second
,
this
->
_length_of_interval
);
}
void
maintenance_problem_generator
::
operator
>>
(
Maintenance_Problem
&
mp
){
...
...
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