JCTVC-G763 CE1: Table-based bit estimation for CABAC - hevc

JCTVC-G763 says: "This new table was derived using the table defining the LPS ranges for each state. When deriving this new table it was assumed that the range register in the CABAC engine takes value R with a probability proportional to 1/R". How to understand it?
How to produce array m_entropyBits?
const Int ContextModel::m_entropyBits[ ContextModel::m_totalStates ] =
{
#ifdef FAST_BIT_EST
// Corrected table, most notably for last state
0x07b23, 0x085f9, 0x074a0, 0x08cbc, 0x06ee4, 0x09354, 0x067f4, 0x09c1b, 0x060b0, 0x0a62a, 0x05a9c, 0x0af5b, 0x0548d, 0x0b955, 0x04f56, 0x0c2a9,
0x04a87, 0x0cbf7, 0x045d6, 0x0d5c3, 0x04144, 0x0e01b, 0x03d88, 0x0e937, 0x039e0, 0x0f2cd, 0x03663, 0x0fc9e, 0x03347, 0x10600, 0x03050, 0x10f95,
0x02d4d, 0x11a02, 0x02ad3, 0x12333, 0x0286e, 0x12cad, 0x02604, 0x136df, 0x02425, 0x13f48, 0x021f4, 0x149c4, 0x0203e, 0x1527b, 0x01e4d, 0x15d00,
0x01c99, 0x166de, 0x01b18, 0x17017, 0x019a5, 0x17988, 0x01841, 0x18327, 0x016df, 0x18d50, 0x015d9, 0x19547, 0x0147c, 0x1a083, 0x0138e, 0x1a8a3,
0x01251, 0x1b418, 0x01166, 0x1bd27, 0x01068, 0x1c77b, 0x00f7f, 0x1d18e, 0x00eda, 0x1d91a, 0x00e19, 0x1e254, 0x00d4f, 0x1ec9a, 0x00c90, 0x1f6e0,
0x00c01, 0x1fef8, 0x00b5f, 0x208b1, 0x00ab6, 0x21362, 0x00a15, 0x21e46, 0x00988, 0x2285d, 0x00934, 0x22ea8, 0x008a8, 0x239b2, 0x0081d, 0x24577,
0x007c9, 0x24ce6, 0x00763, 0x25663, 0x00710, 0x25e8f, 0x006a0, 0x26a26, 0x00672, 0x26f23, 0x005e8, 0x27ef8, 0x005ba, 0x284b5, 0x0055e, 0x29057,
0x0050c, 0x29bab, 0x004c1, 0x2a674, 0x004a7, 0x2aa5e, 0x0046f, 0x2b32f, 0x0041f, 0x2c0ad, 0x003e7, 0x2ca8d, 0x003ba, 0x2d323, 0x0010c, 0x3bfbb
#endif
};

What is your ultimate goal? Is it to understand the CABAC context tables or just printing out rates while encoding ?

Related

How to use e.findAt for similar geometrical models?

I used Abaqus macro recording when defining a set: by edge (20 deg). My end goal is to run the script for different .STEP models/geometries which are identical in every aspect except for a few parametric values. For each model I am using the same procedure for selecting the highlighted edges: create a set from edge-by-angle-20.
However, when I run it for other geometric models, it selects an entirely different e.getSequenceFromMask or as I should say entirely different sets for e.findAt after running the commands for the similar edge.
session.journalOptions.replayGeometry
session.journalOptions.setValues(replayGeometry=INDEX)
I am aware that the program has restrictions over findAt :
findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any edge that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point.
Edge to be selected in all models which are similar with a few variations in dimensions
I would appreciate it if anyone can suggest how to ensure the same edges are selected for different geometries when using the e.findAt command.
My code:
#Sample for the same edges selected from different dimensioned CAD models
#CAD Model_1
edges = e.getSequenceFromMask(mask=(
'[#63002104 #88110 #10000480 #20402 #480c802 #10420070 #c4411',
' #70104842 #10022000 #1e2002 #30 #80820010 #20003 #18144186',
' #b000 ]',), )
p.Set(edges=edges, name='Set-2')
#Set 2:
mdb.models['Model-1'].parts['Circular_knit - 2, 3, 10'].edges.findAt(((2.808153, 3.86272, -0.231317),),((3.959929, 2.669325, -0.231317),),((3.581888, 1.932068, -0.134932),),((1.501975, 3.782442, -0.134931),),((2.094736, 4.291667, -0.231317),),((2.135971, 3.464163, -0.134931),),((2.705066, 3.040627, -0.134931),),((3.436245, 3.316406, -0.231317),),((3.19197, 2.524704, -0.134932),),((4.363292, 1.941137, -0.231317),),((3.862971, 1.280728, -0.134932),),((-0.318814, 3.68708, 0.0),),((1.317672, 4.590214, -0.231317),),((4.764061, 0.331739, -0.231318),),((4.74929, -0.500571, -0.231318),),((4.590214, -1.317672, -0.231317),),((4.634078, 1.15397, -0.231318),),((-0.590217, 4.023581, -0.132766),),((-0.331245, 4.765369, -0.229231),),((0.822343, 3.985795, -0.134932),),((0.500571, 4.74929, -0.231318),),((4.02668, 0.590473, -0.134933),),((4.068041, -0.117724, -0.134933),),((4.291667, -2.094736, -0.231317),),((3.464163, -2.135971, -0.134931),),((3.86272, -2.808153, -0.231317),),((1.932068, -3.581888, -0.134932),),((1.280728, -3.862971, -0.134932),),((1.15397, -4.634078, -0.231318),),((0.590473, -4.02668, -0.134933),),((-0.117724, -4.068041, -0.134933),),((3.985795, -0.822343, -0.134932),),((0.117724, 4.068041, -0.134933),),((-1.15397, 4.634078, -0.231318),),((-1.280728, 3.862971, -0.134932),),((-2.524704, 3.19197, -0.134932),),((-2.669325, 3.959929, -0.231317),),((-1.941137, 4.363292, -0.231317),),((-1.932068, 3.581888, -0.134932),),((3.782442, -1.501975, -0.134931),),((3.040627, -2.705066, -0.134931),),((3.316406, -3.436245, -0.231317),),((2.524704, -3.19197, -0.134932),),((2.669325, -3.959929, -0.231317),),((1.941137, -4.363292, -0.231317),),((0.331739, -4.764061, -0.231318),),((-0.500571, -4.74929, -0.231318),),((-3.464163, 2.135971, -0.134931),),((-4.291667, 2.094736, -0.231317),),((-3.316406, 3.436245, -0.231317),),((-3.040627, 2.705066, -0.134931),),((-3.86272, 2.808153, -0.231317),),((-1.317672, -4.590214, -0.231317),),((-0.822343, -3.985795, -0.134932),),((-4.764061, -0.331739, -0.231318),),((-3.959929, -2.669325, -0.231317),),((-3.862971, -1.280728, -0.134932),),((-3.782442, 1.501975, -0.134931),),((-4.590214, 1.317672, -0.231317),),((-3.985795, 0.822343, -0.134932),),((-2.135971, -3.464163, -0.134931),),((-4.74929, 0.500571, -0.231318),),((-4.068041, 0.117724, -0.134933),),((-4.02668, -0.590473, -0.134933),),((-4.634078, -1.15397, -0.231318),),((-4.363292, -1.941137, -0.231317),),((-3.581888, -1.932068, -0.134932),),((-3.19197, -2.524704, -0.134932),),((-3.436245, -3.316406, -0.231317),),((-2.705066, -3.040627, -0.134931),),((-2.094736, -4.291667, -0.231317),),((-1.501975, -3.782442, -0.134931),),((-2.808153, -3.86272, -0.231317),),)
#CAD Model_2
edges = e.getSequenceFromMask(mask=('[#ffffffff:12 #3fffff ]', ), )
p.Set(edges=edges, name='Set-2')
#Set_2:
mdb.models['Model-1'].parts['Circular_knit - 2, 3, 9'].edges.findAt(((3.609683, 0.972388, 1e-06),),((3.573439, 0.962676, 0.012491),),((3.76173, 1.266747, -0.034239),),((4.345677, 1.895909, -0.106922),),((3.369331, 1.576662, 0.046191),),((3.59632, 1.879201, -0.101049),),((4.017677, 2.705061, -0.092682),),((3.044359, 2.137787, 0.046191),),((3.950435, 2.621725, -0.106922),),((4.319341, 2.493773, 0.001066),),((3.51041, 1.897727, -0.09198),),((4.38626, 1.924207, -0.137251),),((3.786618, 1.25932, -0.091981),),((4.653757, 1.133308, -0.137251),),((3.94777, 0.582649, -0.091981),),((4.779853, 0.307975, -0.137252),),((4.987546, 0.0, 0.001066),),((3.968123, -0.096234, -0.034239),),((3.706257, -0.319236, 0.046191),),((4.054105, -0.170725, -0.101049),),((4.831941, 0.333813, -0.092682),),((3.705386, 0.329198, 0.046191),),((3.686317, 0.32753, 0.012491),),((3.591928, 0.967631, 0.046191),),((4.608877, 1.112487, -0.106922),),((3.924549, 0.594285, -0.034239),),((4.732039, 0.295263, -0.106922),),((4.68676, 1.705841, 0.001066),),((3.351983, 1.568572, 0.012491),),((3.38599, 1.58443, 1e-06),),((4.426368, 1.966302, -0.092682),),((3.868004, 1.226157, -0.101049),),((4.700566, 1.167799, -0.092682),),((4.02216, 0.535857, -0.101049),),((3.723697, 0.3308, 1e-06),),((4.332897, 2.501599, 0.037363),),((3.215364, 2.475146, -0.101049),),((3.059416, 2.14833, 1e-06),),((3.028679, 2.126808, 0.012491),),((3.101617, 2.476941, -0.034239),),((3.435161, 3.267881, -0.106922),),((2.613351, 2.620422, 0.012491),),((2.649644, 2.983909, -0.091979),),((2.83651, 3.859543, -0.137251),),((2.134748, 3.057453, 1e-06),),((2.14551, 3.072822, 2e-06),),((2.850196, 3.916052, -0.092682),),((3.215994, 3.832672, 0.037363),),((3.205932, 3.820682, 0.001066),),((2.815512, 3.814744, -0.106922),),((2.129595, 3.050095, 0.046191),),((2.174904, 3.425595, -0.101049),),((2.501599, 4.332897, 0.037363),),((2.493773, 4.319341, 0.001066),),((2.067403, 3.388378, -0.034239),),((3.484612, 1.90072, -0.034239),),((3.985488, 2.656641, -0.137251),),((4.701469, 1.711195, 0.037363),),((4.927189, 0.868796, 0.037363),),((5.003198, 0.0, 0.037363),),((4.711421, -0.530933, -0.106922),),((3.891127, -0.78383, -0.034239),),((4.547648, -1.340996, -0.106922),),((3.695902, -1.447609, -0.034239),),((3.356209, -1.559509, 0.012491),),((3.710189, -1.469294, -0.091979),),((4.68676, -1.705841, 0.001066),),((4.816498, -0.510316, -0.092682),),((3.724569, -0.320838, 1e-06),),((3.687189, -0.317568, 0.012491),),((4.911774, 0.866078, 0.001066),),((3.48691, 3.361627, -0.092682),),((2.626886, 2.633957, 0.046191),),((3.127541, 2.478471, -0.091979),),((3.463619, 3.308353, -0.137251),),((2.639883, 2.646954, 1e-06),),((3.820682, 3.205932, 0.001066),),((3.832672, 3.215994, 0.037363),),((2.62438, 2.9779, -0.034239),),((2.118616, 3.034415, 0.012491),),((2.091239, 3.398682, -0.091979),),((2.736711, 2.995885, -0.101049),),((2.12688, 4.35149, -0.092682),),((1.547014, 3.751221, -0.101049),),((1.711195, 4.701469, 0.037363),),((1.469294, 3.710189, -0.091979),),((2.123214, 4.293462, -0.137251),),((2.110314, 4.245698, -0.106922),),((3.988971, -0.111726, -0.091981),),((4.911774, -0.866078, 0.001066),),((4.760715, -0.526717, -0.137252),),((3.594516, -0.957971, 0.046191),),((3.576027, -0.953017, 0.012491),),((3.908966, -0.802706, -0.09198),),((4.927189, -0.868796, 0.037363),),((3.373557, -1.567599, 0.046191),),((4.245698, -2.110314, -0.106922),),((4.319341, -2.493773, 0.001066),),((4.332897, -2.501599, 0.037363),),((4.35149, -2.12688, -0.092682),),((4.293462, -2.123214, -0.137251),),((3.390216, -1.575367, 1e-06),),((4.596926, -1.345405, -0.137251),),((3.612271, -0.962729, 1e-06),),((4.65471, -1.338939, -0.092682),),((3.751221, -1.547014, -0.101049),),((3.962868, -0.872119, -0.101049),),((1.567599, 3.373557, 0.046191),),((1.338939, 4.65471, -0.092682),),((0.872119, 3.962868, -0.101049),),((0.510316, 4.816498, -0.092682),),((0.321655, 3.733897, 2e-06),),((0.320019, 3.715207, 1e-06),),((0.111726, 3.988971, -0.091981),),((0.0, 4.987546, 0.001066),),((0.096234, 3.968123, -0.034239),),((0.530933, 4.711421, -0.106922),),((0.866078, 4.911774, 0.001066),),((0.526717, 4.760715, -0.137252),),((1.705841, 4.68676, 0.001066),),((1.345405, 4.596926, -0.137251),),((0.802706, 3.908966, -0.09198),),((1.571395, 3.381699, 1e-06),),((1.579324, 3.398703, 2e-06),),((1.447609, 3.695902, -0.034239),),((1.559509, 3.356209, 0.012491),),((3.388378, -2.067403, -0.034239),),((3.050095, -2.129595, 0.046191),),((3.065152, -2.140139, 1e-06),),((3.034415, -2.118616, 0.012491),),((3.398682, -2.091239, -0.091979),),((3.425595, -2.174904, -0.101049),),((4.701469, -1.711195, 0.037363),),((0.965152, 3.621316, 2e-06),),((0.957971, 3.594516, 0.046191),),((0.953017, 3.576027, 0.012491),),((0.868796, 4.927189, 0.037363),),((0.319236, 3.706257, 0.046191),),((0.170725, 4.054105, -0.101049),),((0.0, 5.003198, 0.037363),),((-0.3073, 4.782091, -0.136321),),((-0.320838, 3.724565, 1e-05),),((-0.323171, 3.73689, 1.3e-05),),((-0.324216, 3.705803, 0.046199),),((-0.593805, 3.921017, -0.033079),),((-0.866078, 4.911774, 0.001066),),((-1.133308, 4.653757, -0.137251),),((-0.972388, 3.609683, 1e-06),),((-0.967631, 3.591928, 0.046191),),((-1.112487, 4.608877, -0.106922),),((0.317568, 3.687189, 0.012491),),((-0.294772, 4.734331, -0.106051),),((0.78383, 3.891127, -0.034239),),((1.340996, 4.547648, -0.106922),),((0.960296, 3.603193, 1e-06),),((3.814744, -2.815512, -0.106922),),((3.820682, -3.205932, 0.001066),),((3.832672, -3.215994, 0.037363),),((3.916052, -2.850196, -0.092682),),((3.859543, -2.83651, -0.137251),),((-0.332828, 4.834011, -0.091687),),((-0.318814, 3.68708, 0.0),),((-0.325817, 3.724111, 1e-05),),((-0.536001, 4.018603, -0.099875),),((-0.868796, 4.927189, 0.037363),),((-0.319237, 3.706259, 0.046191),),((-0.322549, 3.68675, 0.0125),),((-0.31881, 3.687067, 0.05),),((-0.317568, 3.687186, 0.012495),),((-0.582378, 3.944173, -0.090789),),((-0.962676, 3.573439, 0.012491),),((-1.25932, 3.786618, -0.091981),),((-1.711195, 4.701469, 0.037363),),((-1.226157, 3.868004, -0.101049),),((-1.167799, 4.700566, -0.092682),),((2.9779, -2.62438, -0.034239),),((3.267881, -3.435161, -0.106922),),((2.476941, -3.101617, -0.034239),),((2.137787, -3.044359, 0.046191),),((2.475146, -3.215364, -0.101049),),((3.361627, -3.48691, -0.092682),),((2.633957, -2.626886, 0.046191),),((2.620422, -2.613351, 0.012491),),((2.983909, -2.649644, -0.091979),),((2.995885, -2.736711, -0.101049),),((2.646954, -2.639883, 1e-06),),((-1.266747, 3.76173, -0.034239),),((-1.705841, 4.68676, 0.001066),),((-1.924207, 4.38626, -0.137251),),((-1.58443, 3.38599, 1e-06),),((-1.966302, 4.426368, -0.092682),),((3.205932, -3.820682, 0.001066),),((2.478471, -3.127541, -0.091979),),((2.656641, -3.985488, -0.137251),),((2.493773, -4.319341, 0.001066),),((1.90072, -3.484612, -0.034239),),((1.576662, -3.369331, 0.046191),),((1.879201, -3.59632, -0.101049),),((2.705061, -4.017677, -0.092682),),((2.126808, -3.028679, 0.012491),),((2.14833, -3.059416, 1e-06),),((3.215994, -3.832672, 0.037363),),((3.308353, -3.463619, -0.137251),),((-1.895909, 4.345677, -0.106922),),((-1.568572, 3.351983, 0.012491),),((-1.897727, 3.51041, -0.09198),),((-2.501599, 4.332897, 0.037363),),((-2.705061, 4.017677, -0.092682),),((-2.137787, 3.044359, 0.046191),),((-2.621725, 3.950435, -0.106922),),((-2.493773, 4.319341, 0.001066),),((-2.656641, 3.985488, -0.137251),),((-2.14833, 3.059416, 1e-06),),((-1.576662, 3.369331, 0.046191),),((2.501599, -4.332897, 0.037363),),((2.621725, -3.950435, -0.106922),),((1.895909, -4.345677, -0.106922),),((1.705841, -4.68676, 0.001066),),((1.924207, -4.38626, -0.137251),),((1.58443, -3.38599, 1e-06),),((1.966302, -4.426368, -0.092682),),((-1.90072, 3.484612, -0.034239),),((-1.879201, 3.59632, -0.101049),),((-2.475146, 3.215364, -0.101049),),((-2.476941, 3.101617, -0.034239),),((-2.126808, 3.028679, 0.012491),),((-2.478471, 3.127541, -0.091979),),((-3.308353, 3.463619, -0.137251),),((-2.646954, 2.639883, 1e-06),),((-3.361627, 3.48691, -0.092682),),((-3.215994, 3.832672, 0.037363),),((1.897727, -3.51041, -0.09198),),((1.568572, -3.351983, 0.012491),),((1.266747, -3.76173, -0.034239),),((0.967631, -3.591928, 0.046191),),((0.972388, -3.609683, 1e-06),),((0.962676, -3.573439, 0.012491),),((1.112487, -4.608877, -0.106922),),((0.594285, -3.924549, -0.034239),),((0.329198, -3.705386, 0.046191),),((0.535857, -4.02216, -0.101049),),((1.167799, -4.700566, -0.092682),),((1.226157, -3.868004, -0.101049),),((1.711195, -4.701469, 0.037363),),((1.25932, -3.786618, -0.091981),),((-3.267881, 3.435161, -0.106922),),((-3.205932, 3.820682, 0.001066),),((-2.620422, 2.613351, 0.012491),),((-2.983909, 2.649644, -0.091979),),((-3.859543, 2.83651, -0.137251),),((-3.065152, 2.140139, 1e-06),),((-3.050095, 2.129595, 0.046191),),((-3.034415, 2.118616, 0.012491),),((-3.398682, 2.091239, -0.091979),),)+mdb.models['Model-1'].parts['Circular_knit - 2, 3, 9'].edges.findAt(((-4.319341, 2.493773, 0.001066),),((-4.245698, 2.110314, -0.106922),),((-3.695902, 1.447609, -0.034239),),((-4.547648, 1.340996, -0.106922),),((-3.576027, 0.953017, 0.012491),),((-3.908966, 0.802706, -0.09198),),((-4.760715, 0.526717, -0.137252),),((-3.724569, 0.320838, 1e-06),),((-4.816498, 0.510316, -0.092682),),((-3.962868, 0.872119, -0.101049),),((-3.612271, 0.962729, 1e-06),),((-2.633957, 2.626886, 0.046191),),((0.866078, -4.911774, 0.001066),),((1.133308, -4.653757, -0.137251),),((0.295263, -4.732039, -0.106922),),((-0.096234, -3.968123, -0.034239),),((-0.530933, -4.711421, -0.106922),),((-0.78383, -3.891127, -0.034239),),((-0.957971, -3.594516, 0.046191),),((-0.872119, -3.962868, -0.101049),),((-0.868796, -4.927189, 0.037363),),((-0.802706, -3.908966, -0.09198),),((-1.345405, -4.596926, -0.137251),),((-1.711195, -4.701469, 0.037363),),((-1.338939, -4.65471, -0.092682),),((0.3308, -3.723697, 1e-06),),((0.333813, -4.831941, -0.092682),),((0.0, -5.003198, 0.037363),),((0.0, -4.987546, 0.001066),),((0.868796, -4.927189, 0.037363),),((-2.9779, 2.62438, -0.034239),),((-3.820682, 3.205932, 0.001066),),((-3.832672, 3.215994, 0.037363),),((-3.916052, 2.850196, -0.092682),),((-3.425595, 2.174904, -0.101049),),((-3.388378, 2.067403, -0.034239),),((-3.814744, 2.815512, -0.106922),),((-4.293462, 2.123214, -0.137251),),((-3.390216, 1.575367, 1e-06),),((-4.35149, 2.12688, -0.092682),),((-4.332897, 2.501599, 0.037363),),((-3.373557, 1.567599, 0.046191),),((-3.356209, 1.559509, 0.012491),),((-3.710189, 1.469294, -0.091979),),((-4.701469, 1.711195, 0.037363),),((-4.65471, 1.338939, -0.092682),),((-3.594516, 0.957971, 0.046191),),((-4.68676, 1.705841, 0.001066),),((-4.596926, 1.345405, -0.137251),),((-3.891127, 0.78383, -0.034239),),((-4.927189, 0.868796, 0.037363),),((-3.687189, 0.317568, 0.012491),),((-3.988971, 0.111726, -0.091981),),((-4.779853, -0.307975, -0.137252),),((-3.723697, -0.3308, 1e-06),),((-4.831941, -0.333813, -0.092682),),((-4.054105, 0.170725, -0.101049),),((-3.706257, 0.319236, 0.046191),),((-4.711421, 0.530933, -0.106922),),((-4.911774, 0.866078, 0.001066),),((-2.995885, 2.736711, -0.101049),),((0.32753, -3.686317, 0.012491),),((0.582649, -3.94777, -0.091981),),((-0.319236, -3.706257, 0.046191),),((-0.317568, -3.687189, 0.012491),),((-0.111726, -3.988971, -0.091981),),((0.307975, -4.779853, -0.137252),),((-0.866078, -4.911774, 0.001066),),((-0.526717, -4.760715, -0.137252),),((-0.320838, -3.724569, 1e-06),),((-0.510316, -4.816498, -0.092682),),((-0.953017, -3.576027, 0.012491),),((-0.962729, -3.612271, 1e-06),),((-1.705841, -4.68676, 0.001066),),((-1.469294, -3.710189, -0.091979),),((-2.123214, -4.293462, -0.137251),),((-2.091239, -3.398682, -0.091979),),((-2.83651, -3.859543, -0.137251),),((-2.649644, -2.983909, -0.091979),),((-3.463619, -3.308353, -0.137251),),((-3.820682, -3.205932, 0.001066),),((-3.101617, -2.476941, -0.034239),),((-3.044359, -2.137787, 0.046191),),((-3.215364, -2.475146, -0.101049),),((-3.832672, -3.215994, 0.037363),),((-3.127541, -2.478471, -0.091979),),((-3.985488, -2.656641, -0.137251),),((-4.332897, -2.501599, 0.037363),),((-3.59632, -1.879201, -0.101049),),((-3.38599, -1.58443, 1e-06),),((-3.351983, -1.568572, 0.012491),),((-3.484612, -1.90072, -0.034239),),((-4.319341, -2.493773, 0.001066),),((-1.547014, -3.751221, -0.101049),),((-1.575367, -3.390216, 1e-06),),((-1.559509, -3.356209, 0.012491),),((-1.567599, -3.373557, 0.046191),),((-0.170725, -4.054105, -0.101049),),((-3.751221, 1.547014, -0.101049),),((-3.968123, 0.096234, -0.034239),),((-5.003198, 0.0, 0.037363),),((-3.686317, -0.32753, 0.012491),),((-3.94777, -0.582649, -0.091981),),((-4.653757, -1.133308, -0.137251),),((-3.609683, -0.972388, 1e-06),),((-3.591928, -0.967631, 0.046191),),((-4.608877, -1.112487, -0.106922),),((-4.911774, -0.866078, 0.001066),),((-3.705386, -0.329198, 0.046191),),((-4.732039, -0.295263, -0.106922),),((-1.340996, -4.547648, -0.106922),),((-1.447609, -3.695902, -0.034239),),((-2.501599, -4.332897, 0.037363),),((-2.174904, -3.425595, -0.101049),),((-2.850196, -3.916052, -0.092682),),((-2.736711, -2.995885, -0.101049),),((-2.639883, -2.646954, 1e-06),),((-2.613351, -2.620422, 0.012491),),((-3.435161, -3.267881, -0.106922),),((-2.140139, -3.065152, 1e-06),),((-2.129595, -3.050095, 0.046191),),((-2.815512, -3.814744, -0.106922),),((-3.205932, -3.820682, 0.001066),),((-3.215994, -3.832672, 0.037363),),((-3.950435, -2.621725, -0.106922),),((-3.059416, -2.14833, 1e-06),),((-4.017677, -2.705061, -0.092682),),((-3.48691, -3.361627, -0.092682),),((-2.626886, -2.633957, 0.046191),),((-3.51041, -1.897727, -0.09198),),((-4.426368, -1.966302, -0.092682),),((-3.369331, -1.576662, 0.046191),),((-4.345677, -1.895909, -0.106922),),((-4.68676, -1.705841, 0.001066),),((-3.786618, -1.25932, -0.091981),),((-2.12688, -4.35149, -0.092682),),((-2.110314, -4.245698, -0.106922),),((-2.493773, -4.319341, 0.001066),),((-4.987546, 0.0, 0.001066),),((-4.927189, -0.868796, 0.037363),),((-4.700566, -1.167799, -0.092682),),((-3.573439, -0.962676, 0.012491),),((-3.868004, -1.226157, -0.101049),),((-3.76173, -1.266747, -0.034239),),((-3.924549, -0.594285, -0.034239),),((-4.02216, -0.535857, -0.101049),),((-2.62438, -2.9779, -0.034239),),((-2.118616, -3.034415, 0.012491),),((-2.067403, -3.388378, -0.034239),),((-3.028679, -2.126808, 0.012491),),((-4.38626, -1.924207, -0.137251),),((-4.701469, -1.711195, 0.037363),),)
Do not use getSequenceFromMask
This method seems very appealing, however, Abaqus documentation does not cover how masks are formed, so it is not possible to artificially generate a mask for a set of objects.
Use coordinates (findAt()) or indeces instead
Most of the time if your geometry is complex and is generated without control over vertices/edges/etc numbering then the findAt() method is your only option (along with methods getByBoundingBox(...), getByBoundingCylinder(...) and getByBoundingSphere(...)).
If searching edge-by-edge is not very efficient and getByBounding... methods do not allow you to select the right array of edges then you can try: 1) to find the first edge of your sequence; 2) then use (as you already tried) the getEdgesByEdgeAngle(...) method to find all adjacent edges.
If you know for sure the numbering of your geometrical entities (vertices/edges/etc.) then you can access them by their index. So, using notations from your example, if edges of interest of your geometry have indexes from n to m then:
part = mdb.models['Model-1'].parts['Circular_knit - 2, 3, 10']
set2 = part.Set(name='Set-2', edges=part.edges[n:m+1])

AVAudioUnitEQ / .BandPass filter doesn't work

I can't get the AVAudioUnitEQ to work.
Here's a piece of code that should filter out everything except 659.255Hz +/-0.05 octaves:
// Create Audio Engine
var audioEngine = AVAudioEngine()
// Create Equalizer Node
var equalizerNode = AVAudioUnitEQ(numberOfBands: 1)
var epualizerParameters: AVAudioUnitEQFilterParameters = equalizerNode.bands.first as AVAudioUnitEQFilterParameters
epualizerParameters.filterType = .BandPass
epualizerParameters.frequency = 659.255
epualizerParameters.bandwidth = 0.05
epualizerParameters.bypass = false
audioEngine.attachNode(equalizerNode)
// Configure Audio Engine
var format = audioEngine.inputNode.inputFormatForBus(0)
audioEngine.connect(audioEngine.inputNode, to: equalizerNode, format: format)
audioEngine.connect(equalizerNode, to: audioEngine.outputNode, format: format)
// Start Audio Engine
var error:NSError?
audioEngine.startAndReturnError(&error)
However, when I run it, put on my headphones and sing into the microphone, I can hear myself loud and clear.
Now, according to Wikipedia, the Band Pass filter is:
... a device that passes frequencies within a certain range and
rejects (attenuates) frequencies outside that range.
What am I doing wrong? I want to filter out everything except given frequency range.
It was your EQ params.
I created a github project with sliders and switches. You can hear the difference.
Try it.
This works in my project which uses a playerNode.
var format = engine.mainMixerNode.outputFormatForBus(0)
engine.connect(playerNode, to: EQNode, format: format )
engine.connect(EQNode, to: engine.mainMixerNode, format: format)
I see you're using the engine's inputNode. Try swapping out these few lines (hook into the mixer instead of the outputNode) and let us know if it works.

QSqlRelationalTableModel::removerow() deletes the row from table but not from the model

The code speaks better:
model = new QSqlRelationalTableModel();
model->setEditStrategy(QSqlRelationalTableModel::OnRowChange);
model->setTable("members");
model->setRelation(Member_TeamID, QSqlRelation("teams", "ID", "Name"));
model->setSort(Member_Name, Qt::AscendingOrder);
model->select();
mapper = new QDataWidgetMapper();
mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
mapper->setModel(model);
mapper->setItemDelegate(new QSqlRelationalDelegate());
void member_detail::deleteMember()
{
int row = mapper->currentIndex();
bool x= model->removeRow(row);
mapper->submit();
mapper->setCurrentIndex(qMin(row, model->rowCount() - 1));
QMessageBox::critical(0,"W",QString::number(x)); // This Echos false
}
Simply When I call deleteMember , The record is not removed from the model but it's removed from the database (I Check against it using Navicat)
Specs: Qt 5.0.2 Linux 64-bit , g++ as compiler
From QSqlTableModel::removeRows docs:
Emits the beforeDelete() signal before a row is deleted. When the edit
strategy is OnManualSubmit signal emission is delayed until
submitAll() is called.
So check the edit strategy you're using and try to call model->submitAll() after changes.

VFW_E_NOT_IN_GRAPH in directshow's video-capture

Me again, trying to use directShow.
I tried to implement an example from a camera-distributor to read the camera (I would like to get frames in Form of an Byte-Array) and am getting a VFW_E_NOT_IN_GRAPH-Error when trying to connect the pins.
I already searched and now know, that that means, I didn't add a specific Filter to the graphbuilder (or the filter I used isn't compatible?), but I added a Filter and can't see any differences to the sample... however, the sample isn't a project, but only code-scraps, so I think I may have forgotten any initialization...
Could you please take a look at this and tell me whether you find an error?
Everything works find without error, just the last hr is filled with 0x8004025F and nothing happens (I made a stop-point within DoRenderSample-method):
HRESULT hr = S_OK;
IBaseFilter* pFilter=0;
hr=CreateKernelFilter(
CLSID_VideoInputDeviceCategory,
L"Videology USB-C Camera",
&pFilter
);
CoInitialize(NULL);
// CComQIPtr<IVideology20K1XX> pKs(pFilter);
CComQIPtr<IVideologyCommon> pKs( pFilter );
if(pFilter==0)return;
// hr=pKs->SetWhiteBalanceMode(wbAuto);
CBitmapRenderer *m_pSnapshotter = new CBitmapRenderer( _T("Bitmap renderer"), NULL, &hr );
if( FAILED(hr) )
{
ASSERT("Couldn't create bitmap renderer.");
return;
}
m_pSnapshotter->SetCallback( (IBitmapCallback*) this );
CComQIPtr< IBaseFilter > pGrabBase( m_pSnapshotter );
IGraphBuilder* m_pGraphBuilder=0;
hr = CoCreateInstance(CLSID_FilterGraph, NULL,
CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&m_pGraphBuilder);
hr = m_pGraphBuilder->AddFilter( pGrabBase, L"Snapshot" );
CComPtr<IPin> pOutPin;
hr= pFilter->FindPin( L"1", &pOutPin );
CBasePin* pInPin = m_pSnapshotter->GetPin( 0 );
hr = m_pGraphBuilder->Connect( pOutPin, pInPin );
I hope I didn't forget any important informations...
(Using C++-Builder from embarcadero XE2 16 and DirectShow9 from 2005 I think)
The error code tells you what is wrong. VFW_E_NOT_IN_GRAPH, something is not in graph. You connect two pins, which belong to two filters. One of the filters is not in graph. As you add pGrabBase a few lines above, then the other filter is not in the graph. Add it as well prior to connecting pins.

wxBufferedPaintDC GetGraphicsContext return NULL pointer

To get rid of flicker, I use wxBufferedPaintDC in place of wxPaintDC. But there comes a problem. In my paint function, in order to draw a cubic beizer curve I must use GetGraphicsContext to create a path. My question is why GetGraphicsContext returns a NULL pointer when using wxBufferedPaintDC.
void DotGraphView::OnPaint(wxPaintEvent & WXUNUSED(evt))
{
wxBufferedPaintDC dc(this);
PrepareDC(dc);
PaintBackground(dc);
wxGCDC &gdc = (wxGCDC&)dc;
wxGraphicsContext * gc = gdc.GetGraphicsContext(); /* here gc = NULL */
wxGraphicsPath path = gc->CreatePath(); /* program collapses here */
...
}
The cast that you have from wxBufferedPaintDC to wxGCDC looks a little suspicious to me, the wxGraphicsContext pages suggests doing it like this:
wxGraphicsContext *gc = wxGraphicsContext::Create( dc );
if (gc)
{
//drawing code here
delete gc;
}
I feel suspicious too, the suggestion page does not work.
Now I use the following codes and the program run ok.
wxBufferedPaintDC pdc(this);
wxGCDC gdc;
wxGraphicsRenderer * const renderer = wxGraphicsRenderer::GetDefaultRenderer();
wxGraphicsContext * context = renderer->CreateContext(pdc);
gdc.SetGraphicsContext(context);
wxDC & dc = (wxDC &)gdc;
PrepareDC(dc);
Draw(dc);
...
You should use wxAutoBufferedPaintDC.
There is no need to buffer on some platform (like GTK).
Then, you can use the constructor
wxGCDC gcdc(dc);
This works at least on GTK and MSW.