Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b9158234 authored by hhakim's avatar hhakim
Browse files

Adjust test_prod_opt/testProdOpt for pyfaust/matfaust because...

Adjust test_prod_opt/testProdOpt for pyfaust/matfaust because FaustMulMode.GREEDY constant has been deleted (the method is hidden).
parent dc591a4c
No related branches found
No related tags found
No related merge requests found
......@@ -367,7 +367,9 @@ classdef FaustTest < matlab.unittest.TestCase
disp('Test GREEDY and DYNPROG prod opt methods and optimize_time')
F = this.test_faust;
H = clone(F);
set_FM_mul_mode(H, matfaust.FaustMulMode.GREEDY);
GREEDY = 4
% FaustMulMode.GREEDY replaced by GREEDY local variable because GREEDY is not a visible opt. method anymore
set_FM_mul_mode(H, GREEDY); % matfaust.FaustMulMode.GREEDY);
G = clone(F);
set_FM_mul_mode(G, matfaust.FaustMulMode.GREEDY);
this.verifyEqual(full(F), full(H), 'RelTol', 1e-5)
......
......@@ -531,8 +531,9 @@ class TestFaustPy(unittest.TestCase):
def test_prod_opt(self):
from pyfaust import FaustMulMode
print("test GREEDY and DYNPROG prod opt methods and optimize_time.")
GREEDY = 4
H = self.F.clone()
H.m_faust.set_FM_mul_mode(FaustMulMode.GREEDY)
H.m_faust.set_FM_mul_mode(GREEDY) # FaustMulMode.GREEDY replaced by GREEDY local variable because GREEDY is not a visible opt. method anymore
G = self.F.clone()
G.m_faust.set_FM_mul_mode(FaustMulMode.DYNPROG)
self.assertTrue(np.allclose(self.F.toarray(), H.toarray()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment