Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
GregJohnsonJr authored Nov 7, 2024
2 parents c45262e + e3dd3b6 commit e3bc2cb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
3 changes: 2 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ To get started, look at the ["Getting started"](www.schlosslab.org/clustur/) pag
## Contributions

For feature request please visit the issue page in github and use the feature
tag. If you would like to contribute pull request are welcomed!
tag. If you would like to contribute pull request are welcomed!

3 changes: 2 additions & 1 deletion src/ColumnDistanceMatrixReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ bool ColumnDistanceMatrixReader::Read(const std::string& filePath) {
fileHandle.clear();
fileHandle.seekg(0, std::ifstream::beg);
}

while(fileHandle >> firstName >> secondName >> distance && lt == 1){ //let's assume it's a triangular matrix...
int itA;
int itA;
int itB;
try {
itA = nameToIndexMap.at(firstName);
Expand Down
16 changes: 1 addition & 15 deletions src/MatrixAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ SparseDistanceMatrix MatrixAdapter::CreateSparseMatrix() {
matrixNames[i] = positionsToNames[i];
}



// for (int i = 0; i < nameSize; i++) {
// positionsOfIndexs[xPosition[i]] = i; // Position of indexes is incorrectly made
// matrixNames[i] = positionsToNames[i];
// }


for (int i = 0; i < nSeqs; i++) {

double currentDist = data[i];
Expand All @@ -106,13 +98,7 @@ SparseDistanceMatrix MatrixAdapter::CreateSparseMatrix() {
}
const int xIndex = xPosition[i]; // Coming from r -> c++, indeces start at 1 in r
const int yIndex = yPosition[i];

// const double currentValueX = dataList[yIndex].rowValues[xIndex];
// if(currentValueX != 0){ // We already set the value and this is a sparse matrix.
// continue; // WE do not need to reset the values back to zero.
// } // This is a catch all in the case of a sparse and square matrix
// Since the indexes were reverting back to zero, if the values were found again,
// like 2,4 = 0.3, but 4,2 = 0 was found, (its a sparse matrix) so we do not change back the value.

if(xIndex > yIndex)
sparseMatrix.addCell(yIndex, PDistCell(xIndex, static_cast<float>(currentDist)));
else
Expand Down

0 comments on commit e3bc2cb

Please sign in to comment.