Skip to content

Commit

Permalink
+ operator<<(Boundary)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-raden committed Apr 29, 2024
1 parent dce0133 commit d61e54e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* IntaRNA/Interaction
* Seed::operator"<"
* BUGFIX: less-than check fixed
+ operator<<(Boundary)
* IntaRNA/PredictorMfe :
* updateOptima() :
+ no interaction update if "n==0"
Expand Down
10 changes: 9 additions & 1 deletion src/IntaRNA/Interaction.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Interaction.cpp
*
* Created on: 14.07.2014
* Author: Mmann
*/

Expand All @@ -27,6 +26,15 @@ operator<<(std::ostream& out, const Interaction::BasePair& bp)

////////////////////////////////////////////////////////////////////////////

std::ostream&
operator<<(std::ostream& out, const Interaction::Boundary& b)
{
out <<"("<<b.i1<<":"<<b.i2<<")-("<<b.j1<<","<<b.j2<<")";
return out;
}

////////////////////////////////////////////////////////////////////////////

std::ostream&
operator<<(std::ostream& out, const Interaction& i)
{
Expand Down
10 changes: 9 additions & 1 deletion src/IntaRNA/Interaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,15 @@ class Interaction {
* @param bp the Interaction base pair object to add
* @return the altered stream out
*/
friend std::ostream& operator<<(std::ostream& out, const Interaction::BasePair& bp);
friend std::ostream& operator<<(std::ostream& out, const BasePair& bp);

/**
* Prints the interacting boundary to stream
* @param out the ostream to write to
* @param bp the Interaction Boundary object to add
* @return the altered stream out
*/
friend std::ostream& operator<<(std::ostream& out, const Boundary& bp);

/**
* Prints the interacting base pairs to stream
Expand Down

0 comments on commit d61e54e

Please sign in to comment.