throbber
/**************************************************************/
`/* IRAsimu.cpp */
`/* Hui Jin */
`/**************************************************************/
`/* simulation file of Irregular Repeat Accumlative code.
` The code structure is actually more like an LDGM code
` + an accumulative inner code.
`
` First verstion; 3/20/2000
` Copyright @ Hui Jin, Caltech 2000
`
` Modification: initial verison 3/20/2000
` We should use the same .prm code as in GetInter.cpp,
`which has degree
` decreasing.
` second versioin Use checknode length instead, so
`the
` edge number = k * check_len;
` And now we don't need the restriction in first
` version. The interleaver has been changed.
`*/
`
`#include <iostream.h>
`#include <fstream.h>
`#include <stdlib.h>
`#include <math.h>
`
`#include "IRA.h"
`#include "vector.h"
`#include "ldpc.h"
`#include "paramfio.h"
`#include "capacity.h"
`#include "datatype.hh"
`#include "random.hh"
`#include "node.h"
`
`void printusage()
`{ cout << "Usage" <<endl;
`cout << "IRAsimu paramfile 0 snr infonodelength
`Interfile" << endl;
` cout << "IRAsimu paramfile 1 sigma infonodelength
`Interfile" << endl;
` cout << "IRAsimu paramfile 2 p infonodelength
`Interfile" << endl;
` exit(1);
`
`} v
`
`oid getLRdegree(degree_sequence& L, degree_sequence &R, char *
`filename)
`
`0001
`
`CALTECH - EXHIBIT 2026
`Apple Inc. v. California Institute of Technology
`IPR2017-00701
`
`

`

`{
`
` ivector deg;
`vector fe;
`paramfio P;
` P.set_filename(filename);
`P.read("variable degree", deg);
`P.read("variable fraction", fe);
`L.init(deg.getsize());
`L.d = deg;
`L.fe = fe;
`P.read("check degree", deg);
`P.read("check fraction", fe);
`R.init(deg.getsize());
`R.d = deg;
`R.fe = fe;
`L.edge_to_node();
`R.edge_to_node();
`}
`
`void rate_info(const double rate)
`
`{
`
` cout << "Rate=" << rate << endl;
`capacity C;
`double capacity = C.sn_binary_AWGN(rate);
`cout << "capacity = " << capacity << ",i.e. " \
` <<10*log10(1/(2*rate*capacity*capacity)) <<"dB" <<endl;
`
`oid getInterleaver(int * _interleaver, char *filename, int Edge_num)
`
`fstream inFile(filename, ios::in);
`
`} v
`
`{ i
`
` if(!inFile) {
` cerr<< "cannot open file" << endl;
` exit(-1);
` }
`
` for(int i=0; i<Edge_num; i++)
` inFile >> _interleaver[i];
` inFile.close();
`
`}
`
`int main(int argc, char* argv[])
`
`{
`
`
`
`
`0002
`
`

`

`if (argc !=6)
`{
`
`printusage();
`
`}
`
`
`
`degree_sequence LV;
`degree_sequence LC;
`int argcount = 1;
`
`
` getLRdegree(LV, LC, argv[argcount++]);
`
` double rate = LV.av_inv_degree_edge();
` rate/= LC.av_inv_degree_edge()+ LV.av_inv_degree_edge();
`
` rate_info(rate);
`
` int mode=atoi(argv[argcount++]);
`
`double sigma;
` double snr;
` if(mode==0)
` {snr = atof(argv[argcount++]);
` sigma= sqrt(pow(10, -snr/10.0)/(2*rate));
` }
` else
` {
` sigma=atof(argv[argcount++]);
` snr=10*log10(1/(2*rate*sigma*sigma));
` }
`
`
` int _info_len=atoi(argv[argcount++]);
` int LEdge_num= 0;
` int nv[LV.n];
` {
` double s=0;
` for(int i=0; i< LV.n-1; i++)
` {
` nv[i]= int(floor((s+LV.fn[i])*_info_len) -
`floor(s*_info_len));
` s+=LV.fn[i];
` LEdge_num += nv[i] * LV.d[i];
` }
` nv[LV.n-1]= _info_len -(int)floor(s*_info_len);
` LEdge_num += nv[LV.n-1] * LV.d[LV.n-1];
`
` for(int i=0; i< LV.n; i++)
` {
`
`0003
`
`

`

` cout << nv[i] << " degree " << LV.d[i] << endl;
` }
` }
`
` int _check_len= (int) floor(LEdge_num/LC.av_degree_node());
`
` cout <<"simulation: sigma=" << sigma <<", SNR=" << snr << "dB"
`<< endl;
` cout << "check_len" << _check_len << " Info length" <<
`_info_len
` << endl;
`
` cout << "total edge is " << LEdge_num << "(using check node is
`
`"
`
` <<(int) floor(LC.av_degree_node()*_check_len)<< ")" << endl;
`
` int _Interleaver[LEdge_num];
`
` getInterleaver(_Interleaver, argv[argcount], LEdge_num);
`
`
` RandomGenerator rand;
`
`
` int simu_num=0;
` int WBT=0; //wrong bit counter
` int WBL=0; //wrong blocks counter
`/*
` IRAcode *ira =new IRAcode(_info_len, _check_len, LEdge_num, nv, &LV,
`&LC, sigma, &rand, _Interleaver);
`
` int k= ira->smartIteration();
` cout <<"stop at " <<k << "wrong bits " << ira->wrong_bits()<< endl;
`
`*/
` while(WBL < 20)
` {
` simu_num++;
` IRAcode ira(_info_len, _check_len, LEdge_num, nv, &LV,
`&LC, sigma, &rand, _Interleaver);
` int k= ira.smartIteration();
` int wb=ira.wrong_bits();
` if(wb>0) //wrong block
` {
` WBT+=wb;
` WBL++;
` cout << endl <<"wrong block " << simu_num << " with
`"<<k << "ite, " \
` << wb << "wrong bits" << endl;
`
`0004
`
`

`

` cout << "\t \t current total wrong block " << WBL <<
`endl;
` }
` else //correct block
` cout << "success block " << simu_num << " with "<<k <<
`"ite." << endl;
`
` }
`
` cout << "BER" << double(WBT)/double(_info_len*simu_num) <<
`endl;
` cout << "WER" << double(WBL)/double(simu_num) << endl;
`
`
`}
`
`0005
`
`

This document is available on Docket Alarm but you must sign up to view it.


Or .

Accessing this document will incur an additional charge of $.

After purchase, you can access this document again without charge.

Accept $ Charge
throbber

Still Working On It

This document is taking longer than usual to download. This can happen if we need to contact the court directly to obtain the document and their servers are running slowly.

Give it another minute or two to complete, and then try the refresh button.

throbber

A few More Minutes ... Still Working

It can take up to 5 minutes for us to download a document if the court servers are running slowly.

Thank you for your continued patience.

This document could not be displayed.

We could not find this document within its docket. Please go back to the docket page and check the link. If that does not work, go back to the docket and refresh it to pull the newest information.

Your account does not support viewing this document.

You need a Paid Account to view this document. Click here to change your account type.

Your account does not support viewing this document.

Set your membership status to view this document.

With a Docket Alarm membership, you'll get a whole lot more, including:

  • Up-to-date information for this case.
  • Email alerts whenever there is an update.
  • Full text search for other cases.
  • Get email alerts whenever a new case matches your search.

Become a Member

One Moment Please

The filing “” is large (MB) and is being downloaded.

Please refresh this page in a few minutes to see if the filing has been downloaded. The filing will also be emailed to you when the download completes.

Your document is on its way!

If you do not receive the document in five minutes, contact support at support@docketalarm.com.

Sealed Document

We are unable to display this document, it may be under a court ordered seal.

If you have proper credentials to access the file, you may proceed directly to the court's system using your government issued username and password.


Access Government Site

We are redirecting you
to a mobile optimized page.





Document Unreadable or Corrupt

Refresh this Document
Go to the Docket

We are unable to display this document.

Refresh this Document
Go to the Docket