Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuEST-Kit/QuEST
/ setBitAt
Function
setBitAt
tests/utils/linalg.cpp:79–84 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
77
78
79
qindex setBitAt(qindex num, int ind, int bit) {
80
DEMAND( num >= 0 );
81
82
qindex one = 1;
83
return (num & ~(one << ind)) | (bit << ind);
84
}
85
86
87
qindex setBitsAt(qindex num, vector<int> inds, qindex bits) {
Callers
1
setBitsAt
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected