File: SimpleSparse.h

package info (click to toggle)
bitseq 0.7.5+dfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 676 kB
  • sloc: cpp: 7,043; python: 562; makefile: 150; sh: 52
file content (27 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef SIMPLESPARSE_H
#define SIMPLESPARSE_H

#include<stdint.h>

//#define setVal(x,i,y) {for(i=0;i<x->T;i++)x->val[i]=y;}

class SimpleSparse {
   private:
   bool base;
   public:
   long N,M,T; // reads, transcripts, total
   int_least32_t *rowStart,*colStart,*col;
   double *val;

   SimpleSparse(long n,long m, long t);
   SimpleSparse(SimpleSparse *m0);
   ~SimpleSparse();
   void softmax(SimpleSparse *res) const;
   void softmaxInplace(SimpleSparse *res);
   long countAboveDelta(double delta = 0.99) const;
   void sumCols(double res[]) const;
   void sumRows(double res[]) const;
   double logSumExpVal(long st, long en) const;
};

#endif