-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add curved smell propagation #3
base: master
Are you sure you want to change the base?
Conversation
logger.info(WorkerActor.MetricsMarker, logHeader) | ||
|
||
import net.ceedubs.ficus.Ficus._ | ||
Try(forminConfig.as[ConfigType]("config")) match { | ||
Try(parsedConfig.as[ConfigType]("config")) match { | ||
case Success(parsedConfig) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zmiana nazwy zmiennej wyżej jak najbardziej słuszna, ale tutaj teraz będzie shadowing zmiennej. Może w tej linijce zmienić parsedConfig
na config
?
@@ -16,6 +16,11 @@ trait XinukConfig { | |||
def iterationsNumber: Long | |||
} | |||
|
|||
trait XinukConfigWithBendFactors extends XinukConfig { | |||
def crossBendFactor: Double | |||
def straightBendFactor: Double |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zastanawiam się, czy nie byłoby prościej dodać te wartości do podstawowego XinukConfig
u - jeżeli symulacja nie skorzysta z zakrzywiania sygnału, to po prostu zostaną zignorowane. Idąc krok dalej, gdyby zakrzywiony zapach ustalić jako domyślny, podstawiając 0.0
pod te wartości chyba otrzymamy z powrotem oryginalny wzór bez zakrzywiania, chociaż pewnie mniej wydajnie liczony (wyliczanie zerowych składników vs. z góry pomijanie zerowych składników).
import scala.collection.immutable.TreeSet | ||
import scala.util.{Failure, Success, Try} | ||
|
||
class SimulationWithCurvedSmellPropagation[ConfigType <: XinukConfig : ValueReader]( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jeżeli dodatkowe pola konfiguracji dodamy do bazowego XinukConfig
u, to unikniemy tworzenia całej tej klasy.
…strate functionallity.
No description provided.