Skip to content

Commit

Permalink
Cleaner code. Updated for loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyro9922 committed Aug 29, 2020
1 parent 8651b80 commit bc79dbe
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ enum class COORDINATE_SYSTEM {
ECLIPTIC,
GALACTIC};


struct CoordinateData
{
COORDINATE_SYSTEM coordinate_system;
Expand All @@ -53,7 +52,7 @@ struct EdgeData
matrix<double> conv_matrix;
};

using graph_t = boost::adjacency_list<boost::vecS, boost::vecS,
using graph_t = boost::adjacency_list<boost::vecS, boost::vecS,
boost::directedS,
CoordinateData,
EdgeData>;
Expand Down Expand Up @@ -120,11 +119,7 @@ matrix<double> convert(const COORDINATE_SYSTEM src,

//Matrix Multiplication
for(auto it = store_path.rbegin(); it + 1 != store_path.rend(); ++it)
{
auto a = *it;
auto b = *(it+1);
ans = prod(G[boost::edge(a,b,G).first].conv_matrix, ans);
}
ans = prod(G[boost::edge(*it,*(it+1),G).first].conv_matrix, ans);

return ans;
}

0 comments on commit bc79dbe

Please sign in to comment.